diff --git a/protocol/src/main/java/net/md_5/bungee/protocol/packet/ClientCommand.java b/protocol/src/main/java/net/md_5/bungee/protocol/packet/ClientCommand.java index 887ff29f..33c838f9 100644 --- a/protocol/src/main/java/net/md_5/bungee/protocol/packet/ClientCommand.java +++ b/protocol/src/main/java/net/md_5/bungee/protocol/packet/ClientCommand.java @@ -32,7 +32,7 @@ public class ClientCommand extends DefinedPacket @Override public void read(ByteBuf buf, ProtocolConstants.Direction direction, int protocolVersion) { - command = readString( buf, 256 ); + command = readString( buf, ( protocolVersion >= ProtocolConstants.MINECRAFT_1_20_5 ) ? 32767 : 256 ); timestamp = buf.readLong(); salt = buf.readLong(); diff --git a/protocol/src/main/java/net/md_5/bungee/protocol/packet/UnsignedClientCommand.java b/protocol/src/main/java/net/md_5/bungee/protocol/packet/UnsignedClientCommand.java index 97a2bb70..5ee93eaf 100644 --- a/protocol/src/main/java/net/md_5/bungee/protocol/packet/UnsignedClientCommand.java +++ b/protocol/src/main/java/net/md_5/bungee/protocol/packet/UnsignedClientCommand.java @@ -21,7 +21,7 @@ public class UnsignedClientCommand extends DefinedPacket @Override public void read(ByteBuf buf, ProtocolConstants.Direction direction, int protocolVersion) { - command = readString( buf, 256 ); + command = readString( buf, ( protocolVersion >= ProtocolConstants.MINECRAFT_1_20_5 ) ? 32767 : 256 ); } @Override