Close issue #311 - exception feedback on server connector
This commit is contained in:
parent
125df5c22d
commit
8e262cf428
@ -55,6 +55,19 @@ public class ServerConnector extends PacketHandler
|
||||
ENCRYPT_REQUEST, ENCRYPT_RESPONSE, LOGIN, FINISHED;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void exception(Throwable t) throws Exception
|
||||
{
|
||||
String message = "Exception Connectiong:" + Util.exception( t );
|
||||
if ( user.getServer() == null || user.getServer().isForgeWrapper() )
|
||||
{
|
||||
user.disconnect( message );
|
||||
} else
|
||||
{
|
||||
user.sendMessage( ChatColor.RED + message );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void connected(ChannelWrapper channel) throws Exception
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user