Class CustomSkill
java.lang.Object
dev.aurelium.auraskills.api.skill.CustomSkill
- All Implemented Interfaces:
Optioned
,NamespaceIdentified
,Skill
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static class
-
Method Summary
Modifier and TypeMethodDescriptionbuilder
(NamespacedId id) Gets a newCustomSkill.CustomSkillBuilder
used to create a custom skill.Gets the list ofAbility
instances associated with the skill.getDescription
(Locale locale) Gets the skill description as defined in the locale's messages file.getDescription
(Locale locale, boolean formatted) Gets the skill description as defined in the locale's messages file.getDisplayName
(Locale locale) Gets the skill display name as defined in the locale's messages file.getDisplayName
(Locale locale, boolean formatted) Gets the skill display name as defined in the locale's messages file.getId()
Gets theNamespacedId
of the object@Nullable ManaAbility
Gets the mana ability associated with the skill.int
Gets the max level of the skill based on the configuration.Gets the list ofXpSource
instances for the skill.@Nullable Ability
Gets the ability that specifically increases XP gain for the skill when leveled up.boolean
Gets whether the skill is enabled in the configuration.name()
Gets a fully uppercase String of the skill 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()
Returns the result ofNamespacedId.toString()
for the skill's NamespacedId.
-
Method Details
-
builder
Gets a newCustomSkill.CustomSkillBuilder
used to create a custom skill.- Parameters:
id
- theNamespacedId
identifying the skill- 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:Skill
Gets whether the skill is enabled in the configuration. The skill's XP gain, rewards, abilities, and mana abilities are also disabled for disabled skills. -
getAbilities
Description copied from interface:Skill
Gets the list ofAbility
instances associated with the skill. All loaded abilities are returned, some of which might be disabled.- Specified by:
getAbilities
in interfaceSkill
- Returns:
- the abilities of the skill
-
getXpMultiplierAbility
Description copied from interface:Skill
Gets the ability that specifically increases XP gain for the skill when leveled up.- Specified by:
getXpMultiplierAbility
in interfaceSkill
- Returns:
- the XP multiplier ability, or null if there is none
-
getManaAbility
Description copied from interface:Skill
Gets the mana ability associated with the skill.- Specified by:
getManaAbility
in interfaceSkill
- Returns:
- the
ManaAbility
, or null if there is none
-
getSources
Description copied from interface:Skill
Gets the list ofXpSource
instances for the skill. Each XP source is a different way to gain XP in a skill.- Specified by:
getSources
in interfaceSkill
- Returns:
- the list of XP sources
-
getMaxLevel
public int getMaxLevel()Description copied from interface:Skill
Gets the max level of the skill based on the configuration.- Specified by:
getMaxLevel
in interfaceSkill
- Returns:
- the max level
-
getDisplayName
Description copied from interface:Skill
Gets the skill display name as defined in the locale's messages file.- Specified by:
getDisplayName
in interfaceSkill
- 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:Skill
Gets the skill display name as defined in the locale's messages file.- Specified by:
getDisplayName
in interfaceSkill
- Parameters:
locale
- the locale to get the display name informatted
- if false, formatting will not be applied and will return a raw string- Returns:
- the display name in the specified locale or in a fallback language
-
getDescription
Description copied from interface:Skill
Gets the skill description as defined in the locale's messages file.- Specified by:
getDescription
in interfaceSkill
- 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:Skill
Gets the skill description as defined in the locale's messages file.- Specified by:
getDescription
in interfaceSkill
- Parameters:
locale
- the locale to get the description informatted
- if false, formatting will not be applied and will return a raw string- Returns:
- the description in the specified locale or in a fallback language
-
name
Description copied from interface:Skill
Gets a fully uppercase String of the skill 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
Description copied from interface:Skill
Returns the result ofNamespacedId.toString()
for the skill's NamespacedId.- Specified by:
toString
in interfaceSkill
- Overrides:
toString
in classObject
- Returns:
- the String representation of the
NamespacedId
-