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 DisguisePermissionsgetPermissions(org.bukkit.permissions.Permissible permissionHolder, String commandName) getReasonNotAllowed(DisguisePerm disguisePerm, Collection<String> disguiseOptions) Returns a method that was disabled in config if it was the reason why isAllowedDisguise was falsestatic booleanhasMethodOption(HashMap<String, Boolean> methodValues, String value) Returns true if the string is found in the map, or it's not a whitelisted setupstatic booleanhasPermissionOption(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 setupbooleanbooleanisAllowedDisguise(DisguisePerm disguisePerm) booleanisAllowedDisguise(DisguisePerm disguisePerm, Collection<String> disguiseOptions) If this DisguisePermission can use the provided disguise and optionsstatic voidonReload()
-
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
-
getReasonNotAllowed
public DisguiseParseException getReasonNotAllowed(DisguisePerm disguisePerm, Collection<String> disguiseOptions) Returns a method that was disabled in config if it was the reason why isAllowedDisguise was false -
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
-