mirror of
https://github.com/PaperMC/Paper.git
synced 2026-11-25 10:29:41 -05:00
Don't allow players with modded clients to send empty (0 char) chat messages. Thanks to a PR by robin0van0der0v
This commit is contained in:
1 parent
dfbcd36ab7
commit
b369805590
1 file changed
+5
@@ -724,6 +724,11 @@ public class NetServerHandler extends NetHandler implements ICommandListener {
|
||||
|
||||
public boolean chat(String s) {
|
||||
if (!this.player.dead) {
|
||||
if (s.length() == 0) {
|
||||
a.warning(this.player.name + " tried to send an empty message");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (s.startsWith("/")) {
|
||||
this.handleCommand(s);
|
||||
return true;
|
||||
|
||||
Reference in new issue
Block a user