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
ConstructorDescriptionPlayerLevelUpEvent
(org.bukkit.entity.Player player, int newLevel, int levelUpXp) Called when a player levels up. -
Method Summary
Modifier and TypeMethodDescriptionstatic 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
-
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 classorg.bukkit.event.Event
-
getHandlerList
public static org.bukkit.event.HandlerList getHandlerList()
-