Enum Class Stats

java.lang.Object
java.lang.Enum<Stats>
dev.aurelium.auraskills.api.stat.Stats
All Implemented Interfaces:
Optioned, NamespaceIdentified, Stat, Serializable, Comparable<Stats>, Constable

public enum Stats extends Enum<Stats> implements Stat
  • Enum Constant Details

    • STRENGTH

      public static final Stats STRENGTH
    • HEALTH

      public static final Stats HEALTH
    • REGENERATION

      public static final Stats REGENERATION
    • LUCK

      public static final Stats LUCK
    • WISDOM

      public static final Stats WISDOM
    • TOUGHNESS

      public static final Stats TOUGHNESS
    • CRIT_CHANCE

      public static final Stats CRIT_CHANCE
    • CRIT_DAMAGE

      public static final Stats CRIT_DAMAGE
    • SPEED

      public static final Stats SPEED
  • Method Details

    • values

      public static Stats[] 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 Stats 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
    • getId

      public NamespacedId getId()
      Description copied from interface: NamespaceIdentified
      Gets the NamespacedId of the object
      Specified by:
      getId in interface NamespaceIdentified
      Returns:
      the NamespacedId
    • toString

      public String toString()
      Overrides:
      toString in class Enum<Stats>
    • isEnabled

      public boolean isEnabled()
      Description copied from interface: Stat
      Gets whether the stat is enabled in the configuration. Disabled stats have no effect and are hidden from menus and messages.
      Specified by:
      isEnabled in interface Stat
      Returns:
      whether the stat is enabled
    • getTraits

      public List<Trait> getTraits()
      Description copied from interface: Stat
      Gets the list of Trait instances leveled by the stat. Traits are the gameplay aspects buffed by a stat. The trait value is determined by the stat level multiplied by the modifier in stats.yml.
      Specified by:
      getTraits in interface Stat
      Returns:
      the list of traits
    • getTraitModifier

      public double getTraitModifier(Trait trait)
      Description copied from interface: Stat
      Gets the modifier value for a Trait associated with the stat defined in stats.yml. The modifier value is multiplied by the stat level to determine the trait value, which is the value directly used by the trait implementation.
      Specified by:
      getTraitModifier in interface Stat
      Parameters:
      trait - the trait modifier value
      Returns:
      the trait modifier
    • getDisplayName

      public String getDisplayName(Locale locale)
      Description copied from interface: Stat
      Gets the stat display name as defined in the locale's messages file.
      Specified by:
      getDisplayName in interface Stat
      Parameters:
      locale - the locale to get the display name in
      Returns:
      the display name in the specified locale or in a fallback language
    • getDisplayName

      public String getDisplayName(Locale locale, boolean formatted)
      Description copied from interface: Stat
      Gets the stat display name as defined in the locale's messages file.
      Specified by:
      getDisplayName in interface Stat
      Parameters:
      locale - the locale to get the display name in
      formatted - whether to apply formatting to the display name
      Returns:
      the display name in the specified locale or in a fallback language
    • getDescription

      public String getDescription(Locale locale)
      Description copied from interface: Stat
      Gets the stat description as defined in the locale's messages file.
      Specified by:
      getDescription in interface Stat
      Parameters:
      locale - the locale to get the description in
      Returns:
      the description in the specified locale or in a fallback language
    • getDescription

      public String getDescription(Locale locale, boolean formatted)
      Description copied from interface: Stat
      Gets the stat description as defined in the locale's messages file.
      Specified by:
      getDescription in interface Stat
      Parameters:
      locale - the locale to get the description in
      formatted - whether to apply formatting to the description
      Returns:
      the description in the specified locale or in a fallback language
    • getColor

      public String getColor(Locale locale)
      Description copied from interface: Stat
      Gets the stat color as defined in the messages file.
      Specified by:
      getColor in interface Stat
      Parameters:
      locale - the locale to get the color in
      Returns:
      the color in the specified locale or in a fallback language
    • getColoredName

      public String getColoredName(Locale locale)
      Description copied from interface: Stat
      Gets the stat's display name applied with its color
      Specified by:
      getColoredName in interface Stat
      Parameters:
      locale - the locale to get the name and color in
      Returns:
      the colored name
    • getSymbol

      public String getSymbol(Locale locale)
      Description copied from interface: Stat
      Gets the symbol as defined in the messages file.
      Specified by:
      getSymbol in interface Stat
      Parameters:
      locale - the locale to get the symbol in
      Returns:
      the symbol in the specified locale or in a fallback language
    • optionBoolean

      public boolean optionBoolean(String key)
      Specified by:
      optionBoolean in interface Optioned
    • optionBoolean

      public boolean optionBoolean(String key, boolean def)
      Specified by:
      optionBoolean in interface Optioned
    • optionInt

      public int optionInt(String key)
      Specified by:
      optionInt in interface Optioned
    • optionInt

      public int optionInt(String key, int def)
      Specified by:
      optionInt in interface Optioned
    • optionDouble

      public double optionDouble(String key)
      Specified by:
      optionDouble in interface Optioned
    • optionDouble

      public double optionDouble(String key, double def)
      Specified by:
      optionDouble in interface Optioned
    • optionString

      public String optionString(String key)
      Specified by:
      optionString in interface Optioned
    • optionString

      public String optionString(String key, String def)
      Specified by:
      optionString in interface Optioned
    • optionStringList

      public List<String> optionStringList(String key)
      Specified by:
      optionStringList in interface Optioned
    • optionMap

      public Map<String,Object> optionMap(String key)
      Specified by:
      optionMap in interface Optioned