When using disguise command. 'p' is a subsitute for player

This commit is contained in:
libraryaddict 2014-04-12 05:31:46 +12:00
parent 684d996754
commit d53a34f5e4

View File

@ -134,13 +134,17 @@ public abstract class BaseDisguiseCommand implements CommandExecutor {
throw new Exception(); throw new Exception();
} }
DisguiseType disguiseType = null; DisguiseType disguiseType = null;
for (DisguiseType type : DisguiseType.values()) { if (args[0].equalsIgnoreCase("p")) {
if (type.getEntityType() == null) { disguiseType = DisguiseType.PLAYER;
continue; } else {
} for (DisguiseType type : DisguiseType.values()) {
if (args[0].equalsIgnoreCase(type.name()) || type.name().replace("_", "").equalsIgnoreCase(args[0])) { if (type.getEntityType() == null) {
disguiseType = type; continue;
break; }
if (args[0].equalsIgnoreCase(type.name()) || args[0].equalsIgnoreCase(type.name().replace("_", ""))) {
disguiseType = type;
break;
}
} }
} }
if (disguiseType == null) { if (disguiseType == null) {