Class PlayerPickupDropEvent

java.lang.Object
org.bukkit.event.Event
org.bukkit.event.player.PlayerEvent
de.marcely.bedwars.api.event.player.PlayerPickupDropEvent
All Implemented Interfaces:
ArenaEvent, Cancellable

public class PlayerPickupDropEvent extends PlayerEvent implements ArenaEvent, Cancellable
Gets called whenever a player picks up a spawner item.

Note that this even gets called when an item is being picked up that hasn't been dropped by a spawner, but instead by e.g. a player.

  • Constructor Details

    • PlayerPickupDropEvent

      public PlayerPickupDropEvent(Player who, Arena arena, DropType dropType, Item item, boolean fromSpawner)
  • Method Details

    • getHandlers

      public HandlerList getHandlers()
      Specified by:
      getHandlers in class Event
    • getDropType

      public DropType getDropType()
      Returns the potential DropType of the spawner that dropped this item.
      Returns:
      The drop type of the item
    • getItem

      public Item getItem()
      Returns the item that the player is trying to pick up.
      Returns:
      The item that is being picked up
    • isFromSpawner

      public boolean isFromSpawner()
      Get whether it has never picked up before or whether a player just dropped it and picked it up again.
      Returns:
      true if it has been dropped by a spawner (and nobody picked it up before), false if it has been dropped by something else.
    • getHandlerList

      public static HandlerList getHandlerList()