mirror of
https://github.com/SpigotMC/BungeeCord.git
synced 2024-11-23 18:55:22 +01:00
#1848: Added missing call to UserConnection.connect callback for "already_connected" and "already_connecting"
This commit is contained in:
parent
80b3135a93
commit
4c7c64c9b8
@ -256,6 +256,10 @@ public final class UserConnection implements ProxiedPlayer
|
||||
ServerConnectEvent event = new ServerConnectEvent( this, info );
|
||||
if ( bungee.getPluginManager().callEvent( event ).isCancelled() )
|
||||
{
|
||||
if ( callback != null )
|
||||
{
|
||||
callback.done( false, null );
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
@ -263,11 +267,21 @@ public final class UserConnection implements ProxiedPlayer
|
||||
|
||||
if ( getServer() != null && Objects.equal( getServer().getInfo(), target ) )
|
||||
{
|
||||
if ( callback != null )
|
||||
{
|
||||
callback.done( false, null );
|
||||
}
|
||||
|
||||
sendMessage( bungee.getTranslation( "already_connected" ) );
|
||||
return;
|
||||
}
|
||||
if ( pendingConnects.contains( target ) )
|
||||
{
|
||||
if ( callback != null )
|
||||
{
|
||||
callback.done( false, null );
|
||||
}
|
||||
|
||||
sendMessage( bungee.getTranslation( "already_connecting" ) );
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user