Class PlayerXpGainEvent
java.lang.Object
org.bukkit.event.Event
com.andrei1058.bedwars.api.events.player.PlayerXpGainEvent
public class PlayerXpGainEvent
extends org.bukkit.event.Event
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
Lets you know why did the player received new xp.Nested classes/interfaces inherited from class org.bukkit.event.Event
org.bukkit.event.Event.Result
-
Constructor Summary
ConstructorDescriptionPlayerXpGainEvent
(org.bukkit.entity.Player player, int amount, PlayerXpGainEvent.XpSource xpSource) Called when a player receives new xp. -
Method Summary
Modifier and TypeMethodDescriptionint
Get the amount of xp received.static org.bukkit.event.HandlerList
org.bukkit.event.HandlerList
org.bukkit.entity.Player
Get the player that have received new xp.Get xp sourceMethods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
-
Constructor Details
-
PlayerXpGainEvent
public PlayerXpGainEvent(org.bukkit.entity.Player player, int amount, PlayerXpGainEvent.XpSource xpSource) Called when a player receives new xp. This only works when the internal Level System is used. Developers can "inject" their own level system.- Parameters:
player
- - target player.amount
- - amount of xp.xpSource
- - where did the player receive xp from.
-
-
Method Details
-
getPlayer
public org.bukkit.entity.Player getPlayer()Get the player that have received new xp. -
getAmount
public int getAmount()Get the amount of xp received. -
getXpSource
Get xp source -
getHandlers
public org.bukkit.event.HandlerList getHandlers()- Specified by:
getHandlers
in classorg.bukkit.event.Event
-
getHandlerList
public static org.bukkit.event.HandlerList getHandlerList()
-