Link to playeritempickup
The PlayerItemPickup Event is fired after a player has interacted with an entity item and an item or amount of an item has been picked up. This event takes place after PlayerPickupItem has been fired.
Link to event-class
You will need to cast the event in the function header as this class:
You can, of course, also import the class before and use that name then.
Event interface extensions
Link to event-interface-extensions
PlayerItemPickup Events implement the following interfaces and are able to call all of their methods/getters/setters as well:
Link to zengetters
The following information can be retrieved from the event:
Link to notes
stackCopy is a copy of the item contained inside of the original entity item, representing what was picked up and placed into the player's inventory.
originalEntity is the item entity with any remaining amount of the item stack (if the player didn't pick up the full amount).