Class PlayerSkillDowngradeEvent

java.lang.Object
org.bukkit.event.Event
studio.magemonkey.fabled.api.event.PlayerSkillDowngradeEvent
All Implemented Interfaces:
org.bukkit.event.Cancellable

public class PlayerSkillDowngradeEvent extends org.bukkit.event.Event implements org.bukkit.event.Cancellable
Event called when a player downgrades a skill
  • Constructor Details

    • PlayerSkillDowngradeEvent

      public PlayerSkillDowngradeEvent(PlayerData playerData, PlayerSkill downgradedSkill, int refund)
      Constructor
      Parameters:
      playerData - data of the player downgrading the skill
      downgradedSkill - the skill that was downgraded
      refund - the amount of refunded skill points
  • Method Details

    • getPlayerData

      public PlayerData getPlayerData()
      Returns:
      data of the player unlocking the skill
    • getDowngradedSkill

      public PlayerSkill getDowngradedSkill()
      Returns:
      skill that was unlocked
    • getRefund

      public int getRefund()
      Returns:
      amount of refunded points from the downgrade
    • isCancelled

      public boolean isCancelled()
      Specified by:
      isCancelled in interface org.bukkit.event.Cancellable
      Returns:
      true if cancelled, false otherwise
    • setCancelled

      public void setCancelled(boolean value)
      Sets whether the event is cancelled
      Specified by:
      setCancelled in interface org.bukkit.event.Cancellable
      Parameters:
      value - true if cancelled, false otherwise
    • getHandlers

      public org.bukkit.event.HandlerList getHandlers()
      Specified by:
      getHandlers in class org.bukkit.event.Event
      Returns:
      gets the handlers for the event
    • getHandlerList

      public static org.bukkit.event.HandlerList getHandlerList()
      Returns:
      gets the handlers for the event