Class DisguisePermissions
java.lang.Object
me.libraryaddict.disguise.utilities.parser.DisguisePermissions
-
Constructor Summary
ConstructorsConstructorDescriptionDisguisePermissions
(org.bukkit.permissions.Permissible permissionHolder, String commandName) -
Method Summary
Modifier and TypeMethodDescriptiongetDisguiseOptions
(org.bukkit.permissions.Permissible permissionsHolder, String permNode, DisguisePerm type) static DisguisePermissions
getPermissions
(org.bukkit.permissions.Permissible permissionHolder, String commandName) static boolean
hasMethodOption
(HashMap<String, Boolean> methodValues, String value) Returns true if the string is found in the map, or it's not a whitelisted setupstatic boolean
hasPermissionOption
(HashMap<String, HashMap<String, Boolean>> disguiseOptions, String method, String value) Returns true if the string is found in the map, or it's not a whitelisted setupboolean
boolean
isAllowedDisguise
(DisguisePerm disguisePerm) boolean
isAllowedDisguise
(DisguisePerm disguisePerm, Collection<String> disguiseOptions) If this DisguisePermission can use the provided disguise and optionsstatic void
onReload()
-
Constructor Details
-
DisguisePermissions
- Parameters:
permissionHolder
- The permissions to checkcommandName
- A lowercase string consisting of the name of one of Lib's Disguises commands
-
-
Method Details
-
getPermissions
public static DisguisePermissions getPermissions(org.bukkit.permissions.Permissible permissionHolder, String commandName) -
onReload
public static void onReload() -
hasPermissions
public boolean hasPermissions()- Returns:
- If any of the disguises can be used
-
getAllowed
-
isAllowedDisguise
If this DisguisePermission can use the provided disguise and options- Parameters:
disguisePerm
-disguiseOptions
-- Returns:
- true if permitted
-
isAllowedDisguise
-
getDisguiseOptions
-
hasMethodOption
Returns true if the string is found in the map, or it's not a whitelisted setupReturns if command user can access the disguise creation permission type
-
hasPermissionOption
public static boolean hasPermissionOption(HashMap<String, HashMap<String, Boolean>> disguiseOptions, String method, String value) Returns true if the string is found in the map, or it's not a whitelisted setupReturns if command user can access the disguise creation permission type
-