Modified Chat packet for multiple versions

This commit is contained in:
Nanit 2021-10-30 18:51:09 +03:00
parent 5af7b9e2fc
commit 0527937bf0

View File

@ -28,7 +28,9 @@ public class PacketChatMessage implements PacketOut {
public void encode(ByteMessage msg, Version version) {
msg.writeString(jsonData);
msg.writeByte(position.index);
msg.writeUuid(sender);
if (version.moreOrEqual(Version.V1_16))
msg.writeUuid(sender);
}
public enum Position {