Enum Class Role

java.lang.Object
java.lang.Enum<Role>
dev.kitteh.factions.permissible.Role
All Implemented Interfaces:
Permissible, Selectable, Serializable, Comparable<Role>, Constable

@AvailableSince("4.0.0") @NullMarked public enum Role extends Enum<Role> implements Permissible
  • Enum Constant Details

    • ADMIN

      @SerializedName(value="ADMIN", alternate="LEADER") public static final Role ADMIN
    • COLEADER

      public static final Role COLEADER
    • MODERATOR

      public static final Role MODERATOR
    • NORMAL

      public static final Role NORMAL
    • RECRUIT

      public static final Role RECRUIT
  • Field Details

    • value

      public final int value
    • nicename

      public final String nicename
    • translation

      public final TL translation
  • Method Details

    • values

      public static Role[] 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 Role 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
    • isAtLeast

      public boolean isAtLeast(Role role)
    • isAtMost

      public boolean isAtMost(Role role)
    • getRelative

      public static @Nullable Role getRelative(Role role, int relative)
    • getByValue

      public static @Nullable Role getByValue(int value)
    • fromString

      public static @Nullable Role fromString(String check)
    • toString

      public String toString()
      Overrides:
      toString in class Enum<Role>
    • translation

      public String translation()
      Specified by:
      translation in interface Permissible
    • getPrefix

      public String getPrefix()
    • color

      public net.kyori.adventure.text.format.TextColor color()
      Specified by:
      color in interface Permissible
    • getRoleNamesAtOrAbove

      public Set<String> getRoleNamesAtOrAbove()
      Gets this role name and roles above it in priority. These names are not localized and will always match the enum values.
      Returns:
      an immutable set of role names
    • getRoleNamesAtOrBelow

      public Set<String> getRoleNamesAtOrBelow()
      Gets this role name and roles below it in priority. These names are not localized and will always match the enum values.
      Returns:
      an immutable set of role names