Fix command packet wrong mark as unsigned (#810)

Dropping previousMessages will break the chat chain
This commit is contained in:
James58899
2022-08-03 18:42:43 +08:00
committed by GitHub
parent e5b84ecf1d
commit 88a5abd26c

View File

@@ -114,9 +114,6 @@ public class PlayerCommand implements MinecraftPacket {
timestamp = Instant.ofEpochMilli(buf.readLong());
salt = buf.readLong();
if (salt == 0L) {
unsigned = true;
}
int mapSize = ProtocolUtils.readVarInt(buf);
if (mapSize > MAX_NUM_ARGUMENTS) {
@@ -152,6 +149,10 @@ public class PlayerCommand implements MinecraftPacket {
}
}
if (salt == 0L && previousMessages.length == 0) {
unsigned = true;
}
}
@Override