Enum Class Relation

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

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

    • MEMBER

      public static final Relation MEMBER
    • ALLY

      public static final Relation ALLY
    • TRUCE

      public static final Relation TRUCE
    • NEUTRAL

      public static final Relation NEUTRAL
    • ENEMY

      public static final Relation ENEMY
  • Field Details

    • value

      public final int value
    • nicename

      public final String nicename
  • Method Details

    • values

      public static Relation[] 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 Relation 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
    • fromString

      public static Relation fromString(String s)
    • toString

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

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

      public String getPluralTranslation()
    • isMember

      public boolean isMember()
    • isAlly

      public boolean isAlly()
    • isTruce

      public boolean isTruce()
    • isNeutral

      public boolean isNeutral()
    • isEnemy

      public boolean isEnemy()
    • isAtLeast

      public boolean isAtLeast(Relation relation)
    • isAtMost

      public boolean isAtMost(Relation relation)
    • color

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

      public int getMax()
    • getRelationCost

      public double getRelationCost()
    • getNameInASet

      public Set<String> getNameInASet()
      Gets this enum name, in lower case, for fastest possible access for Contexts.TERRITORY_RELATION
      Returns:
      an immutable set of just this name