PlayerPickupItem
Link to playerpickupitem
The PlayerPickupItem Event is fired whenever a player interacts with an Entity.
Event Class
Link to event-class
You will need to cast the event in the function header as this class:
crafttweaker.event.PlayerPickupItemEvent
You can, of course, also import the class before and use that name then.
Event interface extensions
Link to event-interface-extensions
PlayerPickupItem Events implement the following interfaces and are able to call all of their methods/getters/setters as well:
ZenGetters/ZenSetters
Link to zengetterszensetters
The following information can be retrieved from the event:
ZenGetter | ZenSetter | Type |
---|---|---|
ZenGetter item | ZenSetter | Type IEntityItem |
ZenGetters/ZenSetters/ZenMethods from extensions
Link to zengetterszensetterszenmethods-from-extensions
The following information can be retrieved from the event:
ZenGetter | ZenSetter | Type |
---|---|---|
ZenGetter canceled | ZenSetter canceled | Type bool |
ZenGetter result | ZenSetter | Type string with value of default , deny or allow |
ZenGetter player | ZenSetter | Type IPlayer |
ZenMethods
event.cancel();
Method, returns void (nothing). Can cancel the event and stop something from happeningevent.deny()
Method, sets the event's result todeny
event.allow()
Method, sets the event's result toallow
event.default()
Method, sets the event's result todefault
From extension of extension
Link to from-extension-of-extension
ZenGetter | ZenSetter | Type |
---|---|---|
ZenGetter entityLivingBase | ZenSetter | Type IEntityLivingBase |