Package dev.aurelium.auraskills.api.stat
Enum Class Stats
- All Implemented Interfaces:
Optioned
,NamespaceIdentified
,Stat
,Serializable
,Comparable<Stats>
,Constable
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescription -
Method Summary
Modifier and TypeMethodDescriptionGets the stat color as defined in the messages file.getColoredName
(Locale locale) Gets the stat's display name applied with its colorgetDescription
(Locale locale) Gets the stat description as defined in the locale's messages file.getDescription
(Locale locale, boolean formatted) Gets the stat description as defined in the locale's messages file.getDisplayName
(Locale locale) Gets the stat display name as defined in the locale's messages file.getDisplayName
(Locale locale, boolean formatted) Gets the stat display name as defined in the locale's messages file.getId()
Gets theNamespacedId
of the objectGets the symbol as defined in the messages file.double
getTraitModifier
(Trait trait) Gets the modifier value for aTrait
associated with the stat defined in stats.yml.Gets the list ofTrait
instances leveled by the stat.boolean
Gets whether the stat is enabled in the configuration.boolean
optionBoolean
(String key) boolean
optionBoolean
(String key, boolean def) double
optionDouble
(String key) double
optionDouble
(String key, double def) int
int
optionString
(String key) optionString
(String key, String def) optionStringList
(String key) toString()
static Stats
Returns the enum constant of this class with the specified name.static Stats[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
STRENGTH
-
HEALTH
-
REGENERATION
-
LUCK
-
WISDOM
-
TOUGHNESS
-
CRIT_CHANCE
-
CRIT_DAMAGE
-
SPEED
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-
getId
Description copied from interface:NamespaceIdentified
Gets theNamespacedId
of the object- Specified by:
getId
in interfaceNamespaceIdentified
- Returns:
- the
NamespacedId
-
toString
-
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. -
getTraits
Description copied from interface:Stat
Gets the list ofTrait
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. -
getTraitModifier
Description copied from interface:Stat
Gets the modifier value for aTrait
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 interfaceStat
- Parameters:
trait
- the trait modifier value- Returns:
- the trait modifier
-
getDisplayName
Description copied from interface:Stat
Gets the stat display name as defined in the locale's messages file.- Specified by:
getDisplayName
in interfaceStat
- Parameters:
locale
- the locale to get the display name in- Returns:
- the display name in the specified locale or in a fallback language
-
getDisplayName
Description copied from interface:Stat
Gets the stat display name as defined in the locale's messages file.- Specified by:
getDisplayName
in interfaceStat
- Parameters:
locale
- the locale to get the display name informatted
- whether to apply formatting to the display name- Returns:
- the display name in the specified locale or in a fallback language
-
getDescription
Description copied from interface:Stat
Gets the stat description as defined in the locale's messages file.- Specified by:
getDescription
in interfaceStat
- Parameters:
locale
- the locale to get the description in- Returns:
- the description in the specified locale or in a fallback language
-
getDescription
Description copied from interface:Stat
Gets the stat description as defined in the locale's messages file.- Specified by:
getDescription
in interfaceStat
- Parameters:
locale
- the locale to get the description informatted
- whether to apply formatting to the description- Returns:
- the description in the specified locale or in a fallback language
-
getColor
Description copied from interface:Stat
Gets the stat color as defined in the messages file. -
getColoredName
Description copied from interface:Stat
Gets the stat's display name applied with its color- Specified by:
getColoredName
in interfaceStat
- Parameters:
locale
- the locale to get the name and color in- Returns:
- the colored name
-
getSymbol
Description copied from interface:Stat
Gets the symbol as defined in the messages file. -
optionBoolean
- Specified by:
optionBoolean
in interfaceOptioned
-
optionBoolean
- Specified by:
optionBoolean
in interfaceOptioned
-
optionInt
-
optionInt
-
optionDouble
- Specified by:
optionDouble
in interfaceOptioned
-
optionDouble
- Specified by:
optionDouble
in interfaceOptioned
-
optionString
- Specified by:
optionString
in interfaceOptioned
-
optionString
- Specified by:
optionString
in interfaceOptioned
-
optionStringList
- Specified by:
optionStringList
in interfaceOptioned
-
optionMap
-