On Item Pickup (Event) — Skript
Addon: Skript · Category: Event
Syntax
[on] [(player|1:entity)] [item] (pick[ ]up|picking up) [[of] %item%]Description
Called when a living entity walks over a dropped item. Note that entities cannot pick items up unless their item pickup state is enabled, so this event never runs on its own. Note also that Minestom does not put the item into the entity's inventory; it only removes the dropped item and plays the pickup animation, so the script decides what the entity actually receives. Cancelling the event leaves the dropped item on the ground.
Event Values
- event-entity
- event-instance
- event-item
- event-item-entity
Examples
on item pickup:
give event-item to event-entity
on player pick up of diamond:
broadcast "%event-entity% found a diamond!"
on entity pickup:
cancel event