Class ClassAbilities

java.lang.Object
dev.itsharshxd.zentrix.api.classes.ClassAbilities

public final class ClassAbilities extends Object
The passive ability types of the built-in classes, as PlayerClass.getAbilityType() reports them.

Each built-in class runs one ability. Until 1.8.0 the API knew these by older names that described mechanics Zentrix no longer has; those names are still accepted in content/classes.yml and resolve, as aliases, to the ability the class really runs:

Ability types and their legacy aliases
ClassAbility typeLegacy alias
Warrior"TRUE_DAMAGE_PROC"KILL_REWARD
Archer"BOW_SHOT_BUFF"-
Looter"CHEST_BONUS"MOB_EXTRA_DROP
Trapper"FALL_DAMAGE_REDUCTION"WOOD_CONSERVATION
Fisherman"FISHING_BONUS"-
Miner"AUTO_SMELT"ORE_DOUBLE_DROP
Since:
1.8.0
  • Field Details

    • TRUE_DAMAGE_PROC

      public static final String TRUE_DAMAGE_PROC
      Warrior: a chance for a melee hit to deal delayed bonus damage.
      See Also:
    • BOW_SHOT_BUFF

      public static final String BOW_SHOT_BUFF
      Archer: critical arrow hits grant regeneration and speed.
      See Also:
    • CHEST_BONUS

      public static final String CHEST_BONUS
      Looter: bonus loot from the first eligible chest or barrel opened.
      See Also:
    • FALL_DAMAGE_REDUCTION

      public static final String FALL_DAMAGE_REDUCTION
      Trapper: reduced fall damage.
      See Also:
    • FISHING_BONUS

      public static final String FISHING_BONUS
      Fisherman: Luck, extra catches and minerals while fishing.
      See Also:
    • AUTO_SMELT

      public static final String AUTO_SMELT
      Miner: mined ores come out smelted, scaled by Fortune.
      See Also:
    • TYPES

      public static final List<String> TYPES
      Every ability type, in class order.
    • LEGACY_ALIASES

      public static final Map<String,String> LEGACY_ALIASES
      Legacy names, by the ability type each now resolves to.
  • Method Details

    • canonical

      @NotNull public static @NotNull Optional<String> canonical(@Nullable @Nullable String name)
      The ability type a configured name stands for.
      Parameters:
      name - an ability type or legacy alias, in any case, with - or _
      Returns:
      the ability type, or empty when the name is neither