Class PlayerXpGainEvent

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

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

      public PlayerXpGainEvent.XpSource getXpSource()
      Get xp source
    • getHandlers

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

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