Class PlayerAttributeChangeEvent

java.lang.Object
org.bukkit.event.Event
org.bukkit.event.player.PlayerEvent
studio.magemonkey.fabled.api.event.PlayerAttributeChangeEvent
All Implemented Interfaces:
org.bukkit.event.Cancellable
Direct Known Subclasses:
PlayerRefundAttributeEvent, PlayerUpAttributeEvent

public class PlayerAttributeChangeEvent extends org.bukkit.event.player.PlayerEvent implements org.bukkit.event.Cancellable
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.bukkit.event.Event

    org.bukkit.event.Event.Result
  • Field Summary

    Fields inherited from class org.bukkit.event.player.PlayerEvent

    player
  • Constructor Summary

    Constructors
    Constructor
    Description
    PlayerAttributeChangeEvent(PlayerData playerData, String attribute, int change)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets the name of the attribute that was refunded
    int
    Gets the amount of change in the attribute.
    static org.bukkit.event.HandlerList
     
    org.bukkit.event.HandlerList
     
    Gets the PlayerData associated with the event
    boolean
    void
    setCancelled(boolean cancelled)
    void
    setChange(int change)
    Gets the amount of change in the attribute.

    Methods inherited from class org.bukkit.event.player.PlayerEvent

    getPlayer

    Methods inherited from class org.bukkit.event.Event

    getEventName, isAsynchronous

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • PlayerAttributeChangeEvent

      public PlayerAttributeChangeEvent(PlayerData playerData, String attribute, int change)
  • Method Details

    • getHandlerList

      public static org.bukkit.event.HandlerList getHandlerList()
    • getHandlers

      public org.bukkit.event.HandlerList getHandlers()
      Specified by:
      getHandlers in class org.bukkit.event.Event
    • getPlayerData

      public PlayerData getPlayerData()
      Gets the PlayerData associated with the event
      Returns:
      PlayerData receiving the refund
    • getAttribute

      public String getAttribute()
      Gets the name of the attribute that was refunded
      Returns:
      name of the refunded attribute
    • getChange

      public int getChange()
      Gets the amount of change in the attribute. This will be negative if the attribute was refunded and positive if it was upgraded.
      Returns:
      amount of change
    • isCancelled

      public boolean isCancelled()
      Specified by:
      isCancelled in interface org.bukkit.event.Cancellable
    • setChange

      public void setChange(int change)
      Gets the amount of change in the attribute. This will be negative if the attribute was refunded and positive if it was upgraded.
    • setCancelled

      public void setCancelled(boolean cancelled)
      Specified by:
      setCancelled in interface org.bukkit.event.Cancellable