Interface ToggleableSkill

All Known Subinterfaces:
Fishing, Lumberjack, Mining, Sniff

public interface ToggleableSkill
A skill the owner can switch on or off at runtime (from the pet menu) independently of whether the skilltree granted it. The on/off flag is persisted per pet via TOGGLE_CODEC.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static final record 
    Persisted on/off flag for a toggleable skill.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    Shared NBT codec for the on/off flag — reuse it for every toggleable skill's state codec.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    True if the owner currently has this skill switched on.
    void
    setEnabled(boolean enabled)
    Switches this skill on or off for the pet.
  • Field Details

  • Method Details

    • isEnabled

      boolean isEnabled()
      True if the owner currently has this skill switched on.
      Returns:
      true if the owner has switched this skill on
    • setEnabled

      void setEnabled(boolean enabled)
      Switches this skill on or off for the pet.
      Parameters:
      enabled - true to switch the skill on