From 829857be7cc01e867bf7aaf1d87c2f13b7049c00 Mon Sep 17 00:00:00 2001 From: creeper123123321 Date: Fri, 15 Feb 2019 18:24:42 -0200 Subject: [PATCH] Use boolean + string --- .../protocol1_12_2to1_13/packets/PlayerPacket1_13.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/nl/matsv/viabackwards/protocol/protocol1_12_2to1_13/packets/PlayerPacket1_13.java b/core/src/main/java/nl/matsv/viabackwards/protocol/protocol1_12_2to1_13/packets/PlayerPacket1_13.java index a6544a40..2df41895 100644 --- a/core/src/main/java/nl/matsv/viabackwards/protocol/protocol1_12_2to1_13/packets/PlayerPacket1_13.java +++ b/core/src/main/java/nl/matsv/viabackwards/protocol/protocol1_12_2to1_13/packets/PlayerPacket1_13.java @@ -114,14 +114,18 @@ public class PlayerPacket1_13 extends Rewriter { } packetWrapper.passthrough(Type.VAR_INT); packetWrapper.passthrough(Type.VAR_INT); - packetWrapper.passthrough(Type.OPTIONAL_CHAT); + if (packetWrapper.passthrough(Type.BOOLEAN)) { + packetWrapper.passthrough(Type.STRING); + } } } else if (action == 1) { // Update Game Mode packetWrapper.passthrough(Type.VAR_INT); } else if (action == 2) { // Update Ping packetWrapper.passthrough(Type.VAR_INT); } else if (action == 3) { // Update Display Name - packetWrapper.passthrough(Type.OPTIONAL_CHAT); + if (packetWrapper.passthrough(Type.BOOLEAN)) { + packetWrapper.passthrough(Type.STRING); + } } else if (action == 4) { // Remove Player storage.usernames.remove(uuid); }