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
ConstructorsConstructorDescriptionPlayerAttributeChangeEvent
(PlayerData playerData, String attribute, int change) -
Method Summary
Modifier and TypeMethodDescriptionGets the name of the attribute that was refundedint
Gets the amount of change in the attribute.static org.bukkit.event.HandlerList
org.bukkit.event.HandlerList
Gets the PlayerData associated with the eventboolean
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
-
Constructor Details
-
PlayerAttributeChangeEvent
-
-
Method Details
-
getHandlerList
public static org.bukkit.event.HandlerList getHandlerList() -
getHandlers
public org.bukkit.event.HandlerList getHandlers()- Specified by:
getHandlers
in classorg.bukkit.event.Event
-
getPlayerData
Gets the PlayerData associated with the event- Returns:
- PlayerData receiving the refund
-
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 interfaceorg.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 interfaceorg.bukkit.event.Cancellable
-