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
ConstructorDescriptionPlayerPickupDropEvent
(Player who, Arena arena, DropType dropType, Item item, boolean fromSpawner) -
Method Summary
Modifier and TypeMethodDescriptionReturns the potentialDropType
of the spawner that dropped this item.static HandlerList
getItem()
Returns the item that the player is trying to pick up.boolean
Get 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
getPlayer
Methods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface de.marcely.bedwars.api.event.arena.ArenaEvent
getArena
Methods inherited from interface org.bukkit.event.Cancellable
isCancelled, setCancelled
-
Constructor Details
-
PlayerPickupDropEvent
-
-
Method Details
-
getHandlers
- Specified by:
getHandlers
in classEvent
-
getDropType
Returns the potentialDropType
of 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:
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
-