Interface Skill

All Superinterfaces:
NamespaceIdentified, Optioned
All Known Implementing Classes:
CustomSkill, Skills

public interface Skill extends Optioned, NamespaceIdentified
  • Method Details

    • isEnabled

      boolean isEnabled()
      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.
      Returns:
      whether the skill is enabled
    • getAbilities

      @NotNull @NotNull List<Ability> getAbilities()
      Gets the list of Ability instances associated with the skill. All loaded abilities are returned, some of which might be disabled.
      Returns:
      the abilities of the skill
    • getXpMultiplierAbility

      @Nullable @Nullable Ability getXpMultiplierAbility()
      Gets the ability that specifically increases XP gain for the skill when leveled up.
      Returns:
      the XP multiplier ability, or null if there is none
    • getManaAbility

      @Nullable @Nullable ManaAbility getManaAbility()
      Gets the mana ability associated with the skill.
      Returns:
      the ManaAbility, or null if there is none
    • getSources

      @NotNull @NotNull List<XpSource> getSources()
      Gets the list of XpSource instances for the skill. Each XP source is a different way to gain XP in a skill.
      Returns:
      the list of XP sources
    • getMaxLevel

      int getMaxLevel()
      Gets the max level of the skill based on the configuration.
      Returns:
      the max level
    • getDisplayName

      String getDisplayName(Locale locale)
      Gets the skill display name as defined in the locale's messages file.
      Parameters:
      locale - the locale to get the display name in
      Returns:
      the display name in the specified locale or in a fallback language
    • getDisplayName

      String getDisplayName(Locale locale, boolean formatted)
      Gets the skill display name as defined in the locale's messages file.
      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

      String getDescription(Locale locale)
      Gets the skill description as defined in the locale's messages file.
      Parameters:
      locale - the locale to get the description in
      Returns:
      the description in the specified locale or in a fallback language
    • getDescription

      String getDescription(Locale locale, boolean formatted)
      Gets the skill description as defined in the locale's messages file.
      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

      String name()
      Gets a fully uppercase String of the skill name without the namespace
      Returns:
      the skill name in all upper case
    • toString

      String toString()
      Returns the result of NamespacedId.toString() for the skill's NamespacedId.
      Overrides:
      toString in class Object
      Returns:
      the String representation of the NamespacedId
    • equals

      default boolean equals(Skill skill)