Enum Class ConsolePermissionProfile

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

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

  • Method Details

    • values

      public static ConsolePermissionProfile[] 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 ConsolePermissionProfile 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