Class PlayerExpCooldownChangeEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.player.PlayerEvent
org.bukkit.event.player.PlayerExpCooldownChangeEvent
Called when a player's experience cooldown changes.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class Event
Event.Result -
Field Summary
Fields inherited from class PlayerEvent
player -
Constructor Summary
ConstructorsConstructorDescriptionPlayerExpCooldownChangeEvent(Player player, int newcooldown, PlayerExpCooldownChangeEvent.ChangeReason reason) -
Method Summary
Modifier and TypeMethodDescriptionstatic HandlerListintGets the new cooldown for the player.Gets the reason for the change.voidsetNewCooldown(int newCooldown) Sets the new cooldown for the player.Methods inherited from class PlayerEvent
getPlayerMethods inherited from class Event
getEventName, isAsynchronous
-
Constructor Details
-
PlayerExpCooldownChangeEvent
public PlayerExpCooldownChangeEvent(@NotNull Player player, int newcooldown, @NotNull PlayerExpCooldownChangeEvent.ChangeReason reason)
-
-
Method Details
-
getReason
Gets the reason for the change.- Returns:
- The reason for the change
-
getNewCooldown
public int getNewCooldown()Gets the new cooldown for the player.- Returns:
- The new cooldown
- See Also:
-
setNewCooldown
public void setNewCooldown(int newCooldown) Sets the new cooldown for the player.- Parameters:
newCooldown- The new cooldown to set- See Also:
-
getHandlers
- Specified by:
getHandlersin classEvent
-
getHandlerList
-