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
  • Constructor Details

  • Method Details

    • getPlayer

      public SDBPlayer getPlayer()
      Get the player whose level was changed
      Returns:
      SDBPlayer object
    • getLevelChangeReason

      public LevelChangeReason 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 class org.bukkit.event.Event
    • getHandlerList

      public static org.bukkit.event.HandlerList getHandlerList()
    • isCancelled

      public boolean isCancelled()
      Specified by:
      isCancelled in interface org.bukkit.event.Cancellable
    • setCancelled

      public void setCancelled(boolean cancelled)
      Specified by:
      setCancelled in interface org.bukkit.event.Cancellable
    • setLevel

      public static boolean setLevel(SDBPlayer target, int newLevel, LevelChangeReason changeReason)