Correctly show outdated_client and outdated_server messages
If the client protocol version is not supported, show outdated_server message only if client version is higher than highest supported protocol version, outdated_client message else.
This commit is contained in:
parent
507a98f28f
commit
1250088f98
@ -294,8 +294,14 @@ public class InitialHandler extends PacketHandler implements PendingConnection
|
|||||||
ch.setProtocol( Protocol.LOGIN );
|
ch.setProtocol( Protocol.LOGIN );
|
||||||
|
|
||||||
if ( !ProtocolConstants.SUPPORTED_VERSION_IDS.contains( handshake.getProtocolVersion() ) )
|
if ( !ProtocolConstants.SUPPORTED_VERSION_IDS.contains( handshake.getProtocolVersion() ) )
|
||||||
|
{
|
||||||
|
if ( handshake.getProtocolVersion() > bungee.getProtocolVersion() )
|
||||||
{
|
{
|
||||||
disconnect( bungee.getTranslation( "outdated_server" ) );
|
disconnect( bungee.getTranslation( "outdated_server" ) );
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
disconnect( bungee.getTranslation( "outdated_client" ) );
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user