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
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.
-
Nested Class Summary
Nested classes/interfaces inherited from class Event
Event.Result -
Field Summary
Fields inherited from class PlayerEvent
player -
Constructor Summary
ConstructorsConstructorDescriptionPlayerPickupDropEvent(Player who, Arena arena, DropType dropType, Item item, boolean fromSpawner) -
Method Summary
Modifier and TypeMethodDescriptionReturns the potentialDropTypeof the spawner that dropped this item.static HandlerListgetItem()Returns the item that the player is trying to pick up.booleanGet whether it has never picked up before or whether a player just dropped it and picked it up again.Methods inherited from class PlayerEvent
getPlayerMethods inherited from class Event
getEventName, isAsynchronousMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ArenaEvent
getArenaMethods inherited from interface Cancellable
isCancelled, setCancelled
-
Constructor Details
-
PlayerPickupDropEvent
-
-
Method Details
-
getHandlers
- Specified by:
getHandlersin classEvent
-
getDropType
-
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:
trueif it has been dropped by a spawner (and nobody picked it up before),falseif it has been dropped by something else.
-
getHandlerList
-