#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 );
|
ServerConnectEvent event = new ServerConnectEvent( this, info );
|
||||||
if ( bungee.getPluginManager().callEvent( event ).isCancelled() )
|
if ( bungee.getPluginManager().callEvent( event ).isCancelled() )
|
||||||
{
|
{
|
||||||
|
if ( callback != null )
|
||||||
|
{
|
||||||
|
callback.done( false, null );
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -263,11 +267,21 @@ public final class UserConnection implements ProxiedPlayer
|
|||||||
|
|
||||||
if ( getServer() != null && Objects.equal( getServer().getInfo(), target ) )
|
if ( getServer() != null && Objects.equal( getServer().getInfo(), target ) )
|
||||||
{
|
{
|
||||||
|
if ( callback != null )
|
||||||
|
{
|
||||||
|
callback.done( false, null );
|
||||||
|
}
|
||||||
|
|
||||||
sendMessage( bungee.getTranslation( "already_connected" ) );
|
sendMessage( bungee.getTranslation( "already_connected" ) );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ( pendingConnects.contains( target ) )
|
if ( pendingConnects.contains( target ) )
|
||||||
{
|
{
|
||||||
|
if ( callback != null )
|
||||||
|
{
|
||||||
|
callback.done( false, null );
|
||||||
|
}
|
||||||
|
|
||||||
sendMessage( bungee.getTranslation( "already_connecting" ) );
|
sendMessage( bungee.getTranslation( "already_connecting" ) );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user