Class CustomSkill
java.lang.Object
dev.aurelium.auraskills.api.skill.CustomSkill
- All Implemented Interfaces:
Optioned,NamespaceIdentified,Skill
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic class -
Method Summary
Modifier and TypeMethodDescriptionbuilder(NamespacedId id) Gets a newCustomSkill.CustomSkillBuilderused to create a custom skill.Gets the list ofAbilityinstances 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 theNamespacedIdof the object@Nullable ManaAbilityGets the mana ability associated with the skill.intGets the max level of the skill based on the configuration.Gets the list ofXpSourceinstances for the skill.@Nullable AbilityGets the ability that specifically increases XP gain for the skill when leveled up.booleanGets whether the skill is enabled in the configuration.name()Gets a fully uppercase String of the skill 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()Returns the result ofNamespacedId.toString()for the skill's NamespacedId.
-
Method Details
-
builder
Gets a newCustomSkill.CustomSkillBuilderused to create a custom skill.- Parameters:
id- theNamespacedIdidentifying the skill- 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:SkillGets 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:SkillGets the list ofAbilityinstances associated with the skill. All loaded abilities are returned, some of which might be disabled.- Specified by:
getAbilitiesin interfaceSkill- Returns:
- the abilities of the skill
-
getXpMultiplierAbility
Description copied from interface:SkillGets the ability that specifically increases XP gain for the skill when leveled up.- Specified by:
getXpMultiplierAbilityin interfaceSkill- Returns:
- the XP multiplier ability, or null if there is none
-
getManaAbility
Description copied from interface:SkillGets the mana ability associated with the skill.- Specified by:
getManaAbilityin interfaceSkill- Returns:
- the
ManaAbility, or null if there is none
-
getSources
Description copied from interface:SkillGets the list ofXpSourceinstances for the skill. Each XP source is a different way to gain XP in a skill.- Specified by:
getSourcesin interfaceSkill- Returns:
- the list of XP sources
-
getMaxLevel
public int getMaxLevel()Description copied from interface:SkillGets the max level of the skill based on the configuration.- Specified by:
getMaxLevelin interfaceSkill- Returns:
- the max level
-
getDisplayName
Description copied from interface:SkillGets the skill display name as defined in the locale's messages file.- Specified by:
getDisplayNamein 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:SkillGets the skill display name as defined in the locale's messages file.- Specified by:
getDisplayNamein 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:SkillGets the skill description as defined in the locale's messages file.- Specified by:
getDescriptionin 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:SkillGets the skill description as defined in the locale's messages file.- Specified by:
getDescriptionin 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:SkillGets a fully uppercase String of the skill 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
Description copied from interface:SkillReturns the result ofNamespacedId.toString()for the skill's NamespacedId.- Specified by:
toStringin interfaceSkill- Overrides:
toStringin classObject- Returns:
- the String representation of the
NamespacedId
-