Interface PassiveSkill

All Known Implementing Classes:
DynamicSkill

public interface PassiveSkill

Interface for skills that cannot be cast but instead apply effects continuously such as buffs or increased stats.

  • Method Summary

    Modifier and Type
    Method
    Description
    void
    initialize(org.bukkit.entity.LivingEntity user, int level)
    Applies effects when the API starts up or when the player logs in.
    void
    stopEffects(org.bukkit.entity.LivingEntity user)
    Stops the effects when the player goes offline or loses the skill
    void
    update(org.bukkit.entity.LivingEntity user, int prevLevel, int newLevel)
    Applies the skill effects when a player upgrades the skill in their skill tree
  • Method Details

    • update

      void update(org.bukkit.entity.LivingEntity user, int prevLevel, int newLevel)

      Applies the skill effects when a player upgrades the skill in their skill tree

      The skill may or not be already unlocked so include the proper checks if you are going to be removing previous effects.

      Parameters:
      user - user to refresh the effect for
      prevLevel - previous skill level
      newLevel - new skill level
    • initialize

      void initialize(org.bukkit.entity.LivingEntity user, int level)

      Applies effects when the API starts up or when the player logs in. There will never be effects already applied before this (unless you start it prematurely) so you can just apply them without checking to remove previous effects.

      Parameters:
      user - user to initialize the effects for
      level - skill level
    • stopEffects

      void stopEffects(org.bukkit.entity.LivingEntity user)

      Stops the effects when the player goes offline or loses the skill

      This could entail stopping tasks you use for the skill, resetting health or other stats, or other lasting effects you use.

      Parameters:
      user - user to stop the effects for