Class PlayerPickEntityEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.player.PlayerEvent
io.papermc.paper.event.player.PlayerPickItemEvent
io.papermc.paper.event.player.PlayerPickEntityEvent
- All Implemented Interfaces:
Cancellable
Event that is fired when a player uses the pick item functionality on an entity
(middle-clicking an entity to get the appropriate item).
After the handling of this event, the contents of the source and the target slot will be swapped,
and the currently selected hotbar slot of the player will be set to the target slot.
-
Nested Class Summary
Nested classes/interfaces inherited from class Event
Event.Result -
Field Summary
Fields inherited from class PlayerEvent
player -
Constructor Summary
ConstructorsConstructorDescriptionPlayerPickEntityEvent(Player player, Entity entity, boolean includeData, int targetSlot, int sourceSlot) -
Method Summary
Methods inherited from class PlayerPickItemEvent
getHandlerList, getHandlers, getSourceSlot, getTargetSlot, isCancelled, isIncludeData, setCancelled, setSourceSlot, setTargetSlotMethods inherited from class PlayerEvent
getPlayerMethods inherited from class Event
callEvent, getEventName, isAsynchronous
-
Constructor Details
-
PlayerPickEntityEvent
-
-
Method Details
-
getEntity
Retrieves the entity associated with this event.- Returns:
- the entity involved in the event
-