From c96628b72e2cfa46ba12a76a1262c00085fbe99f Mon Sep 17 00:00:00 2001 From: md_5 Date: Fri, 21 May 2021 17:45:52 +1000 Subject: [PATCH] #3094: Fix TO_CLIENT max Chat string length --- .../src/main/java/net/md_5/bungee/protocol/packet/Chat.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protocol/src/main/java/net/md_5/bungee/protocol/packet/Chat.java b/protocol/src/main/java/net/md_5/bungee/protocol/packet/Chat.java index bc43d1d7..f886fe6e 100644 --- a/protocol/src/main/java/net/md_5/bungee/protocol/packet/Chat.java +++ b/protocol/src/main/java/net/md_5/bungee/protocol/packet/Chat.java @@ -40,7 +40,7 @@ public class Chat extends DefinedPacket @Override public void read(ByteBuf buf, ProtocolConstants.Direction direction, int protocolVersion) { - message = readString( buf, 256 ); + message = readString( buf, ( direction == ProtocolConstants.Direction.TO_CLIENT ) ? Short.MAX_VALUE : 256 ); if ( direction == ProtocolConstants.Direction.TO_CLIENT ) { position = buf.readByte();