From f43ffd64cb86f08f393cc889e90dc62cc16561ba Mon Sep 17 00:00:00 2001 From: MrGazdag <44264503+MrGazdag@users.noreply.github.com> Date: Mon, 13 Dec 2021 15:13:12 +0100 Subject: [PATCH] fix bungeecord pinging (#538) --- .../server/network/packet/client/handshake/HandshakePacket.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/net/minestom/server/network/packet/client/handshake/HandshakePacket.java b/src/main/java/net/minestom/server/network/packet/client/handshake/HandshakePacket.java index 0ab282d50..3b99d2337 100644 --- a/src/main/java/net/minestom/server/network/packet/client/handshake/HandshakePacket.java +++ b/src/main/java/net/minestom/server/network/packet/client/handshake/HandshakePacket.java @@ -48,7 +48,7 @@ public record HandshakePacket(int protocolVersion, @NotNull String serverAddress String address = serverAddress; // Bungee support (IP forwarding) - if (BungeeCordProxy.isEnabled() && connection instanceof PlayerSocketConnection socketConnection) { + if (BungeeCordProxy.isEnabled() && connection instanceof PlayerSocketConnection socketConnection && nextState == 2) { if (address != null) { final String[] split = address.split("\00");