mirror of
https://github.com/SpigotMC/BungeeCord.git
synced 2024-12-25 01:57:55 +01:00
Throw exception when ServerConnectEvent is handled badly
This commit is contained in:
parent
8574688be7
commit
4d004d5fed
@ -217,7 +217,7 @@ public final class UserConnection implements ProxiedPlayer
|
||||
public void connectNow(ServerInfo target)
|
||||
{
|
||||
dimensionChange = true;
|
||||
connect(target);
|
||||
connect( target );
|
||||
}
|
||||
|
||||
public ServerInfo updateAndGetNextServer(ServerInfo currentTarget)
|
||||
@ -252,6 +252,11 @@ public final class UserConnection implements ProxiedPlayer
|
||||
{
|
||||
callback.done( false, 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