Kaynağa Gözat

There may also be NumberFormatExceptions...

durgus 17 yıl önce
ebeveyn
işleme
f9dfd294d8

+ 3 - 3
L2_GameServer/java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminEditChar.java

@@ -348,9 +348,9 @@ public class AdminEditChar implements IAdminCommandHandler
 				player.sendMessage("Your name color has been changed by a GM");
 				player.broadcastUserInfo();
 			}
-			catch (StringIndexOutOfBoundsException e)
-			{   //Case of empty color
-				activeChar.sendMessage("You need to specify the new color.");
+			catch (Exception e)
+			{   //Case of empty color or invalid hex string
+				activeChar.sendMessage("You need to specify a valid new color.");
 			}
 		}
 		else if (command.startsWith("admin_fullfood"))