From 999c80076d17714845e3576bc357936f55da5735 Mon Sep 17 00:00:00 2001 From: libraryaddict Date: Sat, 24 May 2014 05:01:51 +1200 Subject: [PATCH] Tiny code cleanup --- .../disguise/commands/DisguiseRadiusCommand.java | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/me/libraryaddict/disguise/commands/DisguiseRadiusCommand.java b/src/me/libraryaddict/disguise/commands/DisguiseRadiusCommand.java index e2e63bbe..54dc3fc6 100644 --- a/src/me/libraryaddict/disguise/commands/DisguiseRadiusCommand.java +++ b/src/me/libraryaddict/disguise/commands/DisguiseRadiusCommand.java @@ -58,7 +58,7 @@ public class DisguiseRadiusCommand extends BaseDisguiseCommand { } Class entityClass = Entity.class; int starting = 0; - try { + if (!isNumeric(args[0])) { for (Class c : validClasses) { if (c.getSimpleName().equalsIgnoreCase(args[0])) { entityClass = c; @@ -66,11 +66,10 @@ public class DisguiseRadiusCommand extends BaseDisguiseCommand { break; } } - } catch (Exception ex) { - } - if (starting == 0 && !isNumeric(args[0])) { - sender.sendMessage(ChatColor.RED + "Unrecognised EntityType " + args[0]); - return true; + if (starting == 0) { + sender.sendMessage(ChatColor.RED + "Unrecognised EntityType " + args[0]); + return true; + } } if (args.length == starting + 1) { sender.sendMessage(ChatColor.RED + "You need to supply a disguise as well as the radius"