Add 'custom' and 'vanilla' so you can exclude/include disguises by permission

This commit is contained in:
libraryaddict 2020-05-17 17:57:38 +12:00
parent 262e1c3b6d
commit 548627f2ee
No known key found for this signature in database
GPG Key ID: 052E4FBCD257AEA4

View File

@ -260,7 +260,7 @@ public class DisguisePermissions {
String key = valid.split("\\.")[1];
if (!key.equals("*") && !key.equalsIgnoreCase(commandName)){
if (!key.equals("*") && !key.equalsIgnoreCase(commandName)) {
continue;
}
@ -409,12 +409,16 @@ public class DisguisePermissions {
return 3;
}
} else if (permissionName.equals("custom")) {
if (disguiseType.isMisc()) {
if (disguisePerm.isCustomDisguise()) {
return 3;
}
} else if (permissionName.equals("*")) {
} else if (permissionName.equals("vanilla")) {
if (!disguisePerm.isCustomDisguise()) {
return 4;
}
} else if (permissionName.equals("*")) {
return 5;
}
return -1;
}