mirror of
https://github.com/SpigotMC/BungeeCord.git
synced 2024-12-26 02:27:56 +01:00
Fix outdatedness
This commit is contained in:
parent
00854988fb
commit
da5fa4bb7c
@ -193,14 +193,6 @@ public class InitialHandler extends PacketHandler implements PendingConnection
|
||||
|
||||
bungee.getPluginManager().callEvent( new PlayerHandshakeEvent( InitialHandler.this, handshake ) );
|
||||
|
||||
if ( handshake.getProtocolVersion() > bungee.getProtocolVersion() )
|
||||
{
|
||||
disconnect( bungee.getTranslation( "outdated_server" ) );
|
||||
} else if ( handshake.getProtocolVersion() < bungee.getProtocolVersion() )
|
||||
{
|
||||
disconnect( bungee.getTranslation( "outdated_client" ) );
|
||||
}
|
||||
|
||||
switch ( handshake.getRequestedProtocol() )
|
||||
{
|
||||
case 1:
|
||||
@ -224,6 +216,16 @@ public class InitialHandler extends PacketHandler implements PendingConnection
|
||||
Preconditions.checkState( thisState == State.USERNAME, "Not expecting USERNAME" );
|
||||
this.loginRequest = loginRequest;
|
||||
|
||||
if ( handshake.getProtocolVersion() > bungee.getProtocolVersion() )
|
||||
{
|
||||
disconnect( bungee.getTranslation( "outdated_server" ) );
|
||||
return;
|
||||
} else if ( handshake.getProtocolVersion() < bungee.getProtocolVersion() )
|
||||
{
|
||||
disconnect( bungee.getTranslation( "outdated_client" ) );
|
||||
return;
|
||||
}
|
||||
|
||||
if ( getName().length() > 16 )
|
||||
{
|
||||
disconnect( "Cannot have username longer than 16 characters" );
|
||||
|
Loading…
Reference in New Issue
Block a user