3
0
Mirror von https://github.com/ViaVersion/ViaBackwards.git synchronisiert 2024-07-10 09:18:04 +02:00

Use boolean + string

Dieser Commit ist enthalten in:
creeper123123321 2019-02-15 18:24:42 -02:00
Ursprung 6e5f9e0741
Commit 829857be7c
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 0AC57D54786721D1

Datei anzeigen

@ -114,14 +114,18 @@ public class PlayerPacket1_13 extends Rewriter<Protocol1_12_2To1_13> {
} }
packetWrapper.passthrough(Type.VAR_INT); packetWrapper.passthrough(Type.VAR_INT);
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 } else if (action == 1) { // Update Game Mode
packetWrapper.passthrough(Type.VAR_INT); packetWrapper.passthrough(Type.VAR_INT);
} else if (action == 2) { // Update Ping } else if (action == 2) { // Update Ping
packetWrapper.passthrough(Type.VAR_INT); packetWrapper.passthrough(Type.VAR_INT);
} else if (action == 3) { // Update Display Name } 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 } else if (action == 4) { // Remove Player
storage.usernames.remove(uuid); storage.usernames.remove(uuid);
} }