Class CustomTrait
java.lang.Object
dev.aurelium.auraskills.api.trait.CustomTrait
- All Implemented Interfaces:
Optioned,NamespaceIdentified,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.getId()Gets theNamespacedIdof the objectbooleanGets 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
-
name
Description copied from interface:TraitGets a fully uppercase String of the trait name without the namespace -
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
-