Package dev.aurelium.auraskills.api.stat
Class CustomStat
java.lang.Object
dev.aurelium.auraskills.api.stat.CustomStat
- All Implemented Interfaces:
Optioned
,NamespaceIdentified
,Stat
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static class
-
Method Summary
Modifier and TypeMethodDescriptionstatic CustomStat.CustomStatBuilder
builder
(NamespacedId id) Gets a newCustomStat.CustomStatBuilder
used to create a custom stat.Gets 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.name()
Gets a fully uppercase String of the stat name without the namespaceboolean
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()
-
Method Details
-
builder
Gets a newCustomStat.CustomStatBuilder
used to create a custom stat.- Parameters:
id
- theNamespacedId
identifying the stat- Returns:
- a new builder
-
getDefined
-
getId
Description copied from interface:NamespaceIdentified
Gets theNamespacedId
of the object- Specified by:
getId
in interfaceNamespaceIdentified
- Returns:
- the
NamespacedId
-
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. -
name
Description copied from interface:Stat
Gets a fully uppercase String of the stat name without the namespace -
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
-
toString
-