From 548627f2ee9cb9caa5c34a187764cc9b93a43e9a Mon Sep 17 00:00:00 2001 From: libraryaddict Date: Sun, 17 May 2020 17:57:38 +1200 Subject: [PATCH] Add 'custom' and 'vanilla' so you can exclude/include disguises by permission --- .../disguise/utilities/parser/DisguisePermissions.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/main/java/me/libraryaddict/disguise/utilities/parser/DisguisePermissions.java b/src/main/java/me/libraryaddict/disguise/utilities/parser/DisguisePermissions.java index 76dcaf7a..b3fbb7da 100644 --- a/src/main/java/me/libraryaddict/disguise/utilities/parser/DisguisePermissions.java +++ b/src/main/java/me/libraryaddict/disguise/utilities/parser/DisguisePermissions.java @@ -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,11 +409,15 @@ public class DisguisePermissions { return 3; } } else if (permissionName.equals("custom")) { - if (disguiseType.isMisc()) { + if (disguisePerm.isCustomDisguise()) { return 3; } + } else if (permissionName.equals("vanilla")) { + if (!disguisePerm.isCustomDisguise()) { + return 4; + } } else if (permissionName.equals("*")) { - return 4; + return 5; } return -1;