Enum Class NullPermissionProfile

java.lang.Object
java.lang.Enum<NullPermissionProfile>
com.plotsquared.core.permissions.NullPermissionProfile
All Implemented Interfaces:
PermissionProfile, Serializable, Comparable<NullPermissionProfile>, Constable

public enum NullPermissionProfile extends Enum<NullPermissionProfile> implements PermissionProfile
  • Enum Constant Details

  • Method Details

    • values

      public static NullPermissionProfile[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static NullPermissionProfile valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • hasPermission

      public boolean hasPermission(@Nullable String world, @NonNull String permission)
      Description copied from interface: PermissionProfile
      Check if the owner of the profile has a given permission
      Specified by:
      hasPermission in interface PermissionProfile
      Parameters:
      world - World name
      permission - Permission
      Returns:
      true if the owner has the given permission, else false
    • hasKeyedPermission

      public boolean hasKeyedPermission(@Nullable String world, @NonNull String permission, @NonNull String key)
      Description copied from interface: PermissionProfile
      Check if the owner of the profile has a given keyed permission. Checks both permission.key and permission.*
      Specified by:
      hasKeyedPermission in interface PermissionProfile
      Parameters:
      world - World name
      permission - Permission
      key - Permission "key"
      Returns:
      true if the owner has the given permission, else false