Package dev.aurelium.auraskills.api.stat
Class CustomStat
java.lang.Object
dev.aurelium.auraskills.api.stat.CustomStat
- All Implemented Interfaces:
Optioned,NamespaceIdentified,ReloadableIdentifier,Stat
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic class -
Method Summary
Modifier and TypeMethodDescriptionstatic CustomStat.CustomStatBuilderbuilder(NamespacedId id) Gets a newCustomStat.CustomStatBuilderused 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 theNamespacedIdof the objectGets the symbol as defined in the messages file.doublegetTraitModifier(Trait trait) Gets the modifier value for aTraitassociated with the stat defined in stats.yml.Gets the list ofTraitinstances leveled by the stat.booleanGets whether the stat is enabled in the configuration.name()Gets a fully uppercase String of the stat name without the namespacebooleanoptionBoolean(String key) booleanoptionBoolean(String key, boolean def) doubleoptionDouble(String key) doubleoptionDouble(String key, double def) intintoptionString(String key) optionString(String key, String def) optionStringList(String key) toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface dev.aurelium.auraskills.api.stat.Stat
hasDirectTrait
-
Method Details
-
builder
Gets a newCustomStat.CustomStatBuilderused to create a custom stat.- Parameters:
id- theNamespacedIdidentifying the stat- Returns:
- a new builder
-
getDefined
-
getId
Description copied from interface:NamespaceIdentifiedGets theNamespacedIdof the object- Specified by:
getIdin interfaceNamespaceIdentified- Returns:
- the
NamespacedId
-
isEnabled
public boolean isEnabled()Description copied from interface:StatGets 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:StatGets the list ofTraitinstances 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:StatGets the modifier value for aTraitassociated 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:
getTraitModifierin interfaceStat- Parameters:
trait- the trait modifier value- Returns:
- the trait modifier
-
getDisplayName
Description copied from interface:StatGets the stat display name as defined in the locale's messages file.- Specified by:
getDisplayNamein 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:StatGets the stat display name as defined in the locale's messages file.- Specified by:
getDisplayNamein 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:StatGets the stat description as defined in the locale's messages file.- Specified by:
getDescriptionin 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:StatGets the stat description as defined in the locale's messages file.- Specified by:
getDescriptionin 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:StatGets the stat color as defined in the messages file. -
getColoredName
Description copied from interface:StatGets the stat's display name applied with its color- Specified by:
getColoredNamein interfaceStat- Parameters:
locale- the locale to get the name and color in- Returns:
- the colored name
-
getSymbol
Description copied from interface:StatGets the symbol as defined in the messages file. -
name
Description copied from interface:StatGets a fully uppercase String of the stat name without the namespace- Specified by:
namein interfaceReloadableIdentifier- Specified by:
namein interfaceStat- Returns:
- the stat name in all upper case
-
optionBoolean
- Specified by:
optionBooleanin interfaceOptioned
-
optionBoolean
- Specified by:
optionBooleanin interfaceOptioned
-
optionInt
-
optionInt
-
optionDouble
- Specified by:
optionDoublein interfaceOptioned
-
optionDouble
- Specified by:
optionDoublein interfaceOptioned
-
optionString
- Specified by:
optionStringin interfaceOptioned
-
optionString
- Specified by:
optionStringin interfaceOptioned
-
optionStringList
- Specified by:
optionStringListin interfaceOptioned
-
optionMap
-
toString
-