diff --git a/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java b/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java index e3df6040..e92543f2 100644 --- a/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java +++ b/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java @@ -96,7 +96,7 @@ public class InitialHandler extends PacketHandler implements PendingConnection private enum State { - HANDSHAKE, STATUS, USERNAME, ENCRYPT, FINISHED; + HANDSHAKE, STATUS, PING, USERNAME, ENCRYPT, FINISHED; } @Override @@ -186,13 +186,16 @@ public class InitialHandler extends PacketHandler implements PendingConnection motd, BungeeCord.getInstance().config.getFaviconObject() ), null ); } + + thisState = State.PING; } @Override public void handle(PingPacket ping) throws Exception { - Preconditions.checkState( thisState == State.STATUS, "Not expecting STATUS" ); + Preconditions.checkState( thisState == State.PING, "Not expecting PING" ); unsafe.sendPacket( ping ); + disconnect( "" ); } @Override