Throw exception when ServerConnectEvent is handled badly

This commit is contained in:
md_5 2016-11-25 10:42:30 +11:00
parent 8574688be7
commit 4d004d5fed

View File

@ -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;
}