mirror of
https://github.com/SpigotMC/BungeeCord.git
synced 2024-12-25 01:57:55 +01:00
Mojang allows multiple status queries in a connection, we should too.
This commit is contained in:
parent
9604a9a31e
commit
77f6930280
@ -95,7 +95,7 @@ public class InitialHandler extends PacketHandler implements PendingConnection
|
||||
private enum State
|
||||
{
|
||||
|
||||
HANDSHAKE, STATUS, PING, USERNAME, ENCRYPT, FINISHED;
|
||||
HANDSHAKE, STATUS, USERNAME, ENCRYPT, FINISHED;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -185,16 +185,13 @@ 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.PING, "Not expecting PING" );
|
||||
Preconditions.checkState( thisState == State.STATUS, "Not expecting STATUS" );
|
||||
unsafe.sendPacket( ping );
|
||||
disconnect( "" );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user