Class PlayerLevelUpEvent

java.lang.Object
org.bukkit.event.Event
com.andrei1058.bedwars.api.events.player.PlayerLevelUpEvent

public class PlayerLevelUpEvent extends org.bukkit.event.Event
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.bukkit.event.Event

    org.bukkit.event.Event.Result
  • Constructor Summary

    Constructors
    Constructor
    Description
    PlayerLevelUpEvent(org.bukkit.entity.Player player, int newLevel, int levelUpXp)
    Called when a player levels up.
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.bukkit.event.HandlerList
     
    org.bukkit.event.HandlerList
     
    int
    Get new player level.
    int
    Get new xp target to level up.
    org.bukkit.entity.Player
    Get player.

    Methods inherited from class org.bukkit.event.Event

    getEventName, isAsynchronous

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • PlayerLevelUpEvent

      public PlayerLevelUpEvent(org.bukkit.entity.Player player, int newLevel, int levelUpXp)
      Called when a player levels up. This only works when the internal Level System is used. Developers can "inject" their own level system.
      Parameters:
      player - - target player.
      newLevel - - gained level.
      levelUpXp - - new xp target to level up.
  • Method Details

    • getPlayer

      public org.bukkit.entity.Player getPlayer()
      Get player.
    • getNewLevel

      public int getNewLevel()
      Get new player level.
    • getNewXpTarget

      public int getNewXpTarget()
      Get new xp target to level up.
    • getHandlers

      public org.bukkit.event.HandlerList getHandlers()
      Specified by:
      getHandlers in class org.bukkit.event.Event
    • getHandlerList

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