forked from chipmunkmc/chipmunkbot
ignore long messages/commands
This commit is contained in:
parent
5cef742fef
commit
d63adca59a
1 changed files with 4 additions and 0 deletions
|
@ -49,11 +49,15 @@ public class ChatPlugin extends SessionAdapter {
|
|||
}
|
||||
|
||||
public void message (String message) {
|
||||
if (message.length() > 256) return;
|
||||
|
||||
final ServerboundChatPacket packet = new ServerboundChatPacket(message, Instant.now().toEpochMilli(), 0, null, 0, new BitSet());
|
||||
client.session().send(packet);
|
||||
}
|
||||
|
||||
public void command (String command) {
|
||||
if (command.length() > 256) return;
|
||||
|
||||
final ServerboundChatCommandPacket packet = new ServerboundChatCommandPacket(command, Instant.now().toEpochMilli(), 0, Collections.emptyList(), 0, new BitSet());
|
||||
client.session().send(packet);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue