PlayerItemPickup
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 класс-события
You will need to cast the event in the function header as this class:
crafttweaker.event.PlayerItemPickupEvent
You can, of course, also import the class before and use that name then.
Наследование от интерфейсов событий
Link to наследование-от-интерфейсов-событий
PlayerItemPickup Events implement the following interfaces and are able to call all of their methods/getters/setters as well:
ZenGetters
Link to zengetters
Следующая информация может быть получена от события:
ZenGetter | Возвращаемый тип |
---|---|
ZenGetter stackCopy | Возвращаемый тип IItemStack |
ZenGetter originalEntity | Возвращаемый тип IEntityItem |
Notes
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).