Class CustomTrait
java.lang.Object
dev.aurelium.auraskills.api.trait.CustomTrait
- All Implemented Interfaces:
Optioned,NamespaceIdentified,ReloadableIdentifier,Trait
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionbuilder(NamespacedId id) Gets a newCustomTrait.CustomTraitBuilderused to create a custom trait.getDisplayName(Locale locale) Gets the trait display name as defined in the locale's messages file.getDisplayName(Locale locale, boolean formatted) Gets the trait display name as defined in the locale's messages file.getId()Gets theNamespacedIdof the objectgetMenuDisplay(double value, Locale locale) Formats the given value of this trait to the format shown in the stats menu.booleanGets whether the trait is enabled.name()Gets a fully uppercase String of the trait 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()
-
Method Details
-
builder
Gets a newCustomTrait.CustomTraitBuilderused to create a custom trait.- Parameters:
id- theNamespacedIdidentifying the trait- Returns:
- a new builder
-
getId
Description copied from interface:NamespaceIdentifiedGets theNamespacedIdof the object- Specified by:
getIdin interfaceNamespaceIdentified- Returns:
- the
NamespacedId
-
isEnabled
public boolean isEnabled()Description copied from interface:TraitGets whether the trait is enabled. Disabled traits will have no effect and will be hidden from menus. -
getDisplayName
Description copied from interface:TraitGets the trait display name as defined in the locale's messages file.- Specified by:
getDisplayNamein interfaceTrait- Parameters:
locale- the locale to get the display name- Returns:
- the display name in the specified locale or a fallback language
-
getDisplayName
Description copied from interface:TraitGets the trait display name as defined in the locale's messages file.- Specified by:
getDisplayNamein interfaceTrait- Parameters:
locale- the locale to get the display nameformatted- whether to apply formatting to the display name- Returns:
- the display name in the specified locale or a fallback language
-
getMenuDisplay
Description copied from interface:TraitFormats the given value of this trait to the format shown in the stats menu.- Specified by:
getMenuDisplayin interfaceTrait- Parameters:
value- the value of the traitlocale- the locale to format in- Returns:
- the formatted value
-
name
Description copied from interface:TraitGets a fully uppercase String of the trait name without the namespace- Specified by:
namein interfaceReloadableIdentifier- Specified by:
namein interfaceTrait- Returns:
- the trait 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
-