Class PlayerChangeLevelEvent
java.lang.Object
org.bukkit.event.Event
nl.minetopiasdb.api.events.player.PlayerChangeLevelEvent
- All Implemented Interfaces:
org.bukkit.event.Cancellable
public class PlayerChangeLevelEvent
extends org.bukkit.event.Event
implements org.bukkit.event.Cancellable
Event thrown right before someone's level changes
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
org.bukkit.event.Event.Result
-
Constructor Summary
ConstructorDescriptionPlayerChangeLevelEvent
(SDBPlayer player, LevelChangeReason reason, int newLevel) -
Method Summary
Modifier and TypeMethodDescriptionstatic org.bukkit.event.HandlerList
org.bukkit.event.HandlerList
Get the reason why the level has changed.int
Get the new level for this playerGet the player whose level was changedboolean
void
setCancelled
(boolean cancelled) static boolean
setLevel
(SDBPlayer target, int newLevel, LevelChangeReason changeReason) Methods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
-
Constructor Details
-
PlayerChangeLevelEvent
-
-
Method Details
-
getPlayer
Get the player whose level was changed- Returns:
SDBPlayer
object
-
getLevelChangeReason
Get the reason why the level has changed.- Returns:
- Get the reason why the level of
getPlayer()
is changed
-
getNewLevel
public int getNewLevel()Get the new level for this player- Returns:
- new level
-
getHandlers
public org.bukkit.event.HandlerList getHandlers()- Specified by:
getHandlers
in classorg.bukkit.event.Event
-
getHandlerList
public static org.bukkit.event.HandlerList getHandlerList() -
isCancelled
public boolean isCancelled()- Specified by:
isCancelled
in interfaceorg.bukkit.event.Cancellable
-
setCancelled
public void setCancelled(boolean cancelled) - Specified by:
setCancelled
in interfaceorg.bukkit.event.Cancellable
-
setLevel
-