Reject invalid tab complete command requests.

This commit is contained in:
Andrew Steinborn 2020-05-08 18:16:14 -04:00
parent f7e70cff20
commit 10680f16d3

View File

@ -77,9 +77,9 @@ public class TabCompleteRequest implements MinecraftPacket {
public void decode(ByteBuf buf, ProtocolUtils.Direction direction, ProtocolVersion version) {
if (version.compareTo(MINECRAFT_1_13) >= 0) {
this.transactionId = ProtocolUtils.readVarInt(buf);
this.command = ProtocolUtils.readString(buf);
this.command = ProtocolUtils.readString(buf, Chat.MAX_SERVERBOUND_MESSAGE_LENGTH);
} else {
this.command = ProtocolUtils.readString(buf);
this.command = ProtocolUtils.readString(buf, Chat.MAX_SERVERBOUND_MESSAGE_LENGTH);
if (version.compareTo(MINECRAFT_1_9) >= 0) {
this.assumeCommand = buf.readBoolean();
}