mirror of
https://github.com/SpigotMC/BungeeCord.git
synced 2024-11-24 03:05:49 +01:00
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
This commit is contained in:
parent
d067662967
commit
68712ab854
@ -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 )
|
||||
|
Loading…
Reference in New Issue
Block a user