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
ConstructorsConstructorDescriptionPlayerChangeLevelEvent(SDBPlayer player, LevelChangeReason reason, int newLevel) -
Method Summary
Modifier and TypeMethodDescriptionstatic org.bukkit.event.HandlerListorg.bukkit.event.HandlerListGet the reason why the level has changed.intGet the new level for this playerGet the player whose level was changedbooleanvoidsetCancelled(boolean cancelled) static booleansetLevel(SDBPlayer target, int newLevel, LevelChangeReason changeReason) Methods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
-
Constructor Details
-
PlayerChangeLevelEvent
-
-
Method Details
-
getPlayer
-
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:
getHandlersin classorg.bukkit.event.Event
-
getHandlerList
public static org.bukkit.event.HandlerList getHandlerList() -
isCancelled
public boolean isCancelled()- Specified by:
isCancelledin interfaceorg.bukkit.event.Cancellable
-
setCancelled
public void setCancelled(boolean cancelled) - Specified by:
setCancelledin interfaceorg.bukkit.event.Cancellable
-
setLevel
-