Interface Requirement


public interface Requirement
A condition that must be satisfied before a pet can use a particular Skilltree.

Requirements are registered with the SkilltreeManager and referenced by name in .st.json skilltree files. At runtime, when a player attempts to select or is assigned a skilltree, each configured requirement is evaluated via check(Skilltree, Pet, Settings).

Implementations must be annotated with RequirementName so they can be discovered and looked up by name.

Common implementations include permission checks, economy balance checks, and pet-level thresholds.

  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    check(Skilltree skilltree, Pet pet, Settings settings)
    Evaluates whether the given pet meets this requirement for the specified skilltree.
  • Method Details

    • check

      boolean check(Skilltree skilltree, Pet pet, Settings settings)
      Evaluates whether the given pet meets this requirement for the specified skilltree.
      Parameters:
      skilltree - the skilltree the pet wants to use
      pet - the pet being evaluated
      settings - the requirement-specific configuration from the skilltree definition
      Returns:
      true if the requirement is satisfied