Class CustomSkill

java.lang.Object
dev.aurelium.auraskills.api.skill.CustomSkill
All Implemented Interfaces:
Optioned, NamespaceIdentified, Skill

public class CustomSkill extends Object implements Skill
  • Method Details

    • builder

      public static CustomSkill.CustomSkillBuilder builder(NamespacedId id)
      Gets a new CustomSkill.CustomSkillBuilder used to create a custom skill.
      Parameters:
      id - the NamespacedId identifying the skill
      Returns:
      a new builder
    • getDefined

      public CustomSkill.Defined getDefined()
    • getId

      public NamespacedId getId()
      Description copied from interface: NamespaceIdentified
      Gets the NamespacedId of the object
      Specified by:
      getId in interface NamespaceIdentified
      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.
      Specified by:
      isEnabled in interface Skill
      Returns:
      whether the skill is enabled
    • getAbilities

      @NotNull public @NotNull List<Ability> getAbilities()
      Description copied from interface: Skill
      Gets the list of Ability instances associated with the skill. All loaded abilities are returned, some of which might be disabled.
      Specified by:
      getAbilities in interface Skill
      Returns:
      the abilities of the skill
    • getXpMultiplierAbility

      @Nullable public @Nullable Ability getXpMultiplierAbility()
      Description copied from interface: Skill
      Gets the ability that specifically increases XP gain for the skill when leveled up.
      Specified by:
      getXpMultiplierAbility in interface Skill
      Returns:
      the XP multiplier ability, or null if there is none
    • getManaAbility

      @Nullable public @Nullable ManaAbility getManaAbility()
      Description copied from interface: Skill
      Gets the mana ability associated with the skill.
      Specified by:
      getManaAbility in interface Skill
      Returns:
      the ManaAbility, or null if there is none
    • getSources

      @NotNull public @NotNull List<XpSource> getSources()
      Description copied from interface: Skill
      Gets the list of XpSource instances for the skill. Each XP source is a different way to gain XP in a skill.
      Specified by:
      getSources in interface Skill
      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 interface Skill
      Returns:
      the max level
    • getDisplayName

      public String getDisplayName(Locale locale)
      Description copied from interface: Skill
      Gets the skill display name as defined in the locale's messages file.
      Specified by:
      getDisplayName in interface Skill
      Parameters:
      locale - the locale to get the display name in
      Returns:
      the display name in the specified locale or in a fallback language
    • getDisplayName

      public String getDisplayName(Locale locale, boolean formatted)
      Description copied from interface: Skill
      Gets the skill display name as defined in the locale's messages file.
      Specified by:
      getDisplayName in interface Skill
      Parameters:
      locale - the locale to get the display name in
      formatted - 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

      public String getDescription(Locale locale)
      Description copied from interface: Skill
      Gets the skill description as defined in the locale's messages file.
      Specified by:
      getDescription in interface Skill
      Parameters:
      locale - the locale to get the description in
      Returns:
      the description in the specified locale or in a fallback language
    • getDescription

      public String getDescription(Locale locale, boolean formatted)
      Description copied from interface: Skill
      Gets the skill description as defined in the locale's messages file.
      Specified by:
      getDescription in interface Skill
      Parameters:
      locale - the locale to get the description in
      formatted - 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

      public String name()
      Description copied from interface: Skill
      Gets a fully uppercase String of the skill name without the namespace
      Specified by:
      name in interface Skill
      Returns:
      the skill name in all upper case
    • optionBoolean

      public boolean optionBoolean(String key)
      Specified by:
      optionBoolean in interface Optioned
    • optionBoolean

      public boolean optionBoolean(String key, boolean def)
      Specified by:
      optionBoolean in interface Optioned
    • optionInt

      public int optionInt(String key)
      Specified by:
      optionInt in interface Optioned
    • optionInt

      public int optionInt(String key, int def)
      Specified by:
      optionInt in interface Optioned
    • optionDouble

      public double optionDouble(String key)
      Specified by:
      optionDouble in interface Optioned
    • optionDouble

      public double optionDouble(String key, double def)
      Specified by:
      optionDouble in interface Optioned
    • optionString

      public String optionString(String key)
      Specified by:
      optionString in interface Optioned
    • optionString

      public String optionString(String key, String def)
      Specified by:
      optionString in interface Optioned
    • optionStringList

      public List<String> optionStringList(String key)
      Specified by:
      optionStringList in interface Optioned
    • optionMap

      public Map<String,Object> optionMap(String key)
      Specified by:
      optionMap in interface Optioned
    • toString

      public String toString()
      Description copied from interface: Skill
      Returns the result of NamespacedId.toString() for the skill's NamespacedId.
      Specified by:
      toString in interface Skill
      Overrides:
      toString in class Object
      Returns:
      the String representation of the NamespacedId