When using disguise command. 'p' is a subsitute for player
This commit is contained in:
parent
684d996754
commit
d53a34f5e4
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user