Class CustomTrait
java.lang.Object
dev.aurelium.auraskills.api.trait.CustomTrait
- All Implemented Interfaces:
Optioned
,NamespaceIdentified
,Trait
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuilder
(NamespacedId id) Gets a newCustomTrait.CustomTraitBuilder
used to create a custom trait.getDisplayName
(Locale locale) Gets the trait display name as defined in the locale's messages file.getId()
Gets theNamespacedId
of the objectboolean
Gets whether the trait is enabled.name()
Gets a fully uppercase String of the trait 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 newCustomTrait.CustomTraitBuilder
used to create a custom trait.- Parameters:
id
- theNamespacedId
identifying the trait- Returns:
- a new builder
-
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:Trait
Gets whether the trait is enabled. Disabled traits will have no effect and will be hidden from menus. -
getDisplayName
Description copied from interface:Trait
Gets the trait display name as defined in the locale's messages file.- Specified by:
getDisplayName
in 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:Trait
Gets a fully uppercase String of the trait 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
-