Package org.bukkit.event.player
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 classes/interfaces inherited from class org.bukkit.event.Event
Event.Result
-
Field Summary
Fields inherited from class org.bukkit.event.player.PlayerEvent
player
-
Constructor Summary
ConstructorDescriptionPlayerExpCooldownChangeEvent
(@NotNull Player player, int newcooldown, @NotNull PlayerExpCooldownChangeEvent.ChangeReason reason) -
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull HandlerList
int
Gets the new cooldown for the player.Gets the reason for the change.void
setNewCooldown
(int newCooldown) Sets the new cooldown for the player.Methods inherited from class org.bukkit.event.player.PlayerEvent
getPlayer
Methods inherited from class org.bukkit.event.Event
callEvent, getEventName, isAsynchronous
-
Constructor Details
-
PlayerExpCooldownChangeEvent
-
-
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:
getHandlers
in classEvent
-
getHandlerList
-