Class DisguisePermissions

java.lang.Object
me.libraryaddict.disguise.utilities.parser.DisguisePermissions

public class DisguisePermissions extends Object
  • Constructor Details

    • DisguisePermissions

      public DisguisePermissions(org.bukkit.permissions.Permissible permissionHolder, String commandName)
      Parameters:
      permissionHolder - The permissions to check
      commandName - 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

      public Collection<DisguisePerm> getAllowed()
    • isAllowedDisguise

      public boolean isAllowedDisguise(DisguisePerm disguisePerm, Collection<String> disguiseOptions)
      If this DisguisePermission can use the provided disguise and options
      Parameters:
      disguisePerm -
      disguiseOptions -
      Returns:
      true if permitted
    • isAllowedDisguise

      public boolean isAllowedDisguise(DisguisePerm disguisePerm)
    • getDisguiseOptions

      public static HashMap<String,HashMap<String,Boolean>> getDisguiseOptions(org.bukkit.permissions.Permissible permissionsHolder, String permNode, DisguisePerm type)
    • hasMethodOption

      public 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 setup

      Returns 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 setup

      Returns if command user can access the disguise creation permission type