#3437: Remove unused enum in ServerConnector and add color to exception message

This commit is contained in:
Outfluencer 2023-06-10 09:58:14 +02:00 committed by GitHub
parent 68200133b6
commit a96a2e80a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -73,7 +73,7 @@ public class ServerConnector extends PacketHandler
private enum State private enum State
{ {
LOGIN_SUCCESS, ENCRYPT_RESPONSE, LOGIN, FINISHED; LOGIN_SUCCESS, LOGIN, FINISHED;
} }
@Override @Override
@ -84,13 +84,13 @@ public class ServerConnector extends PacketHandler
return; return;
} }
String message = "Exception Connecting:" + Util.exception( t ); String message = ChatColor.RED + "Exception Connecting: " + Util.exception( t );
if ( user.getServer() == null ) if ( user.getServer() == null )
{ {
user.disconnect( message ); user.disconnect( message );
} else } else
{ {
user.sendMessage( ChatColor.RED + message ); user.sendMessage( message );
} }
} }