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:
BlackHole 2016-05-15 18:59:41 +02:00 committed by md_5
parent 507a98f28f
commit 1250088f98

View File

@ -295,7 +295,13 @@ public class InitialHandler extends PacketHandler implements PendingConnection
if ( !ProtocolConstants.SUPPORTED_VERSION_IDS.contains( handshake.getProtocolVersion() ) )
{
disconnect( bungee.getTranslation( "outdated_server" ) );
if ( handshake.getProtocolVersion() > bungee.getProtocolVersion() )
{
disconnect( bungee.getTranslation( "outdated_server" ) );
} else
{
disconnect( bungee.getTranslation( "outdated_client" ) );
}
return;
}