Package dev.aurelium.auraskills.api.stat
Interface Stat
- All Superinterfaces:
NamespaceIdentified
,Optioned
- All Known Implementing Classes:
CustomStat
,Stats
-
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.Gets 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.name()
Gets a fully uppercase String of the stat name without the namespaceMethods inherited from interface dev.aurelium.auraskills.api.registry.NamespaceIdentified
getId
Methods inherited from interface dev.aurelium.auraskills.api.option.Optioned
optionBoolean, optionBoolean, optionDouble, optionDouble, optionInt, optionInt, optionMap, optionString, optionString, optionStringList
-
Method Details
-
isEnabled
boolean isEnabled()Gets whether the stat is enabled in the configuration. Disabled stats have no effect and are hidden from menus and messages.- Returns:
- whether the stat is enabled
-
getTraits
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.- Returns:
- the list of traits
-
getTraitModifier
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.- Parameters:
trait
- the trait modifier value- Returns:
- the trait modifier
-
getDisplayName
Gets the stat display name as defined in the locale's messages file.- Parameters:
locale
- the locale to get the display name in- Returns:
- the display name in the specified locale or in a fallback language
-
getDisplayName
Gets the stat display name as defined in the locale's messages file.- 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
Gets the stat description as defined in the locale's messages file.- Parameters:
locale
- the locale to get the description in- Returns:
- the description in the specified locale or in a fallback language
-
getDescription
Gets the stat description as defined in the locale's messages file.- 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
Gets the stat color as defined in the messages file.- Parameters:
locale
- the locale to get the color in- Returns:
- the color in the specified locale or in a fallback language
-
getColoredName
Gets the stat's display name applied with its color- Parameters:
locale
- the locale to get the name and color in- Returns:
- the colored name
-
getSymbol
Gets the symbol as defined in the messages file.- Parameters:
locale
- the locale to get the symbol in- Returns:
- the symbol in the specified locale or in a fallback language
-
name
String name()Gets a fully uppercase String of the stat name without the namespace- Returns:
- the stat name in all upper case
-