From d53a34f5e442068c6270ef1a737fc7f8a3970374 Mon Sep 17 00:00:00 2001 From: libraryaddict Date: Sat, 12 Apr 2014 05:31:46 +1200 Subject: [PATCH] When using disguise command. 'p' is a subsitute for player --- .../utilities/BaseDisguiseCommand.java | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/me/libraryaddict/disguise/utilities/BaseDisguiseCommand.java b/src/me/libraryaddict/disguise/utilities/BaseDisguiseCommand.java index ecd158e1..e5de12a4 100644 --- a/src/me/libraryaddict/disguise/utilities/BaseDisguiseCommand.java +++ b/src/me/libraryaddict/disguise/utilities/BaseDisguiseCommand.java @@ -134,13 +134,17 @@ public abstract class BaseDisguiseCommand implements CommandExecutor { throw new Exception(); } DisguiseType disguiseType = null; - for (DisguiseType type : DisguiseType.values()) { - if (type.getEntityType() == null) { - continue; - } - if (args[0].equalsIgnoreCase(type.name()) || type.name().replace("_", "").equalsIgnoreCase(args[0])) { - disguiseType = type; - break; + if (args[0].equalsIgnoreCase("p")) { + disguiseType = DisguiseType.PLAYER; + } else { + for (DisguiseType type : DisguiseType.values()) { + if (type.getEntityType() == null) { + continue; + } + if (args[0].equalsIgnoreCase(type.name()) || args[0].equalsIgnoreCase(type.name().replace("_", ""))) { + disguiseType = type; + break; + } } } if (disguiseType == null) {