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 org.bukkit.event.Event
Event.Result -
Field Summary
Fields inherited from class org.bukkit.event.player.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 org.bukkit.event.player.PlayerEvent
getPlayerMethods inherited from class org.bukkit.event.Event
getEventName, isAsynchronousMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.marcely.bedwars.api.event.arena.ArenaEvent
getArenaMethods inherited from interface org.bukkit.event.Cancellable
isCancelled, setCancelled
-
Constructor Details
-
PlayerPickupDropEvent
-
-
Method Details
-
getHandlers
- Specified by:
getHandlersin classEvent
-
getDropType
Returns the potentialDropTypeof the spawner that dropped this item.- Returns:
- The drop type of the 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:
trueif it has been dropped by a spawner (and nobody picked it up before),falseif it has been dropped by something else.
-
getHandlerList
-