From 1250088f98fc59d28736932fac88586594329ec2 Mon Sep 17 00:00:00 2001 From: BlackHole Date: Sun, 15 May 2016 18:59:41 +0200 Subject: [PATCH] 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. --- .../java/net/md_5/bungee/connection/InitialHandler.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java b/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java index dab6ef2d..3fe1d234 100644 --- a/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java +++ b/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java @@ -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; }