From 68712ab8541cec9471bbf0e8e9fe37f6e9242d38 Mon Sep 17 00:00:00 2001 From: weaondara Date: Tue, 2 Apr 2013 02:13:29 +0300 Subject: [PATCH] check the player's server before really connecting otherwise the player will be kicked with the message "Logged in from another location" if the target server is the current server --- proxy/src/main/java/net/md_5/bungee/UserConnection.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/proxy/src/main/java/net/md_5/bungee/UserConnection.java b/proxy/src/main/java/net/md_5/bungee/UserConnection.java index 4a04e8eb..070cb761 100644 --- a/proxy/src/main/java/net/md_5/bungee/UserConnection.java +++ b/proxy/src/main/java/net/md_5/bungee/UserConnection.java @@ -121,6 +121,10 @@ public final class UserConnection implements ProxiedPlayer ServerConnectEvent event = new ServerConnectEvent( this, info ); ProxyServer.getInstance().getPluginManager().callEvent( event ); final ServerInfo target = event.getTarget(); // Update in case the event changed target + if ( getServer() != null && getServer().getInfo() == target ) + { + return; + } new Bootstrap() .channel( NioSocketChannel.class ) .group( BungeeCord.getInstance().eventLoops )