The PlayerItemTossEvent is fired whenever a player tosses (for example by pressing ‘Q’) an item or drag-n-drops a stack of items outside the inventory GUI screens.
Canceling the event will stop the items from entering the world, but will not prevent them being removed from the inventory - and thus removed from the system.
The PlayerItemTossEvent class is a subtype of the EntityEvent class and inherits all its properties and functions.
Here is an overview of the PlayerItemTossEvent properties:
Property | Type | read / write |
---|---|---|
item | DroppedItem | r |
player | Player | r |
Below you find short descriptions about each of the properties and some examples about how to use them in your spells.
This is the dropped item being tossed.
The player tossing the item.