13
0
geforkt von Mirrors/Velocity

Reject invalid tab complete command requests.

Dieser Commit ist enthalten in:
Andrew Steinborn 2020-05-08 18:16:14 -04:00
Ursprung f7e70cff20
Commit 10680f16d3

Datei anzeigen

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