mirror of
https://github.com/SpigotMC/BungeeCord.git
synced 2024-11-23 10:45:48 +01:00
This commit is contained in:
parent
01a5f36012
commit
9813e46e66
@ -361,7 +361,10 @@ public class ServerConnector extends PacketHandler
|
||||
if ( user.getServer() != null )
|
||||
{
|
||||
// Begin config mode
|
||||
user.unsafe().sendPacket( new StartConfiguration() );
|
||||
if ( user.getCh().getEncodeProtocol() != Protocol.CONFIGURATION )
|
||||
{
|
||||
user.unsafe().sendPacket( new StartConfiguration() );
|
||||
}
|
||||
} else
|
||||
{
|
||||
LoginResult loginProfile = user.getPendingConnection().getLoginProfile();
|
||||
|
@ -306,6 +306,11 @@ public final class UserConnection implements ProxiedPlayer
|
||||
{
|
||||
Preconditions.checkNotNull( request, "request" );
|
||||
|
||||
ch.getHandle().eventLoop().execute( () -> connect0( request ) );
|
||||
}
|
||||
|
||||
private void connect0(final ServerConnectRequest request)
|
||||
{
|
||||
final Callback<ServerConnectRequest.Result> callback = request.getCallback();
|
||||
ServerConnectEvent event = new ServerConnectEvent( this, request.getTarget(), request.getReason(), request );
|
||||
if ( bungee.getPluginManager().callEvent( event ).isCancelled() )
|
||||
@ -315,10 +320,6 @@ public final class UserConnection implements ProxiedPlayer
|
||||
callback.done( ServerConnectRequest.Result.EVENT_CANCEL, null );
|
||||
}
|
||||
|
||||
if ( getServer() == null && !ch.isClosing() )
|
||||
{
|
||||
throw new IllegalStateException( "Cancelled ServerConnectEvent with no server or disconnect." );
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user