Revert "Mojang allows multiple status queries in a connection, we should too."
This reverts commit 77f6930280
.
This commit is contained in:
parent
dd9bd2a2e3
commit
be35e283ec
@ -96,7 +96,7 @@ public class InitialHandler extends PacketHandler implements PendingConnection
|
|||||||
private enum State
|
private enum State
|
||||||
{
|
{
|
||||||
|
|
||||||
HANDSHAKE, STATUS, USERNAME, ENCRYPT, FINISHED;
|
HANDSHAKE, STATUS, PING, USERNAME, ENCRYPT, FINISHED;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -186,13 +186,16 @@ public class InitialHandler extends PacketHandler implements PendingConnection
|
|||||||
motd, BungeeCord.getInstance().config.getFaviconObject() ),
|
motd, BungeeCord.getInstance().config.getFaviconObject() ),
|
||||||
null );
|
null );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
thisState = State.PING;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void handle(PingPacket ping) throws Exception
|
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 );
|
unsafe.sendPacket( ping );
|
||||||
|
disconnect( "" );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user