Skip to content

InventoryTransactionEvent ​

class · pocketmine\event\inventory\InventoryTransactionEvent · source

Extends Event
Implements Cancellable

Called when a player performs actions involving items in inventories.

This may involve multiple inventories, and may include actions such as:

  • moving items from one slot to another
  • splitting itemstacks
  • dragging itemstacks across inventory slots (slot painting)
  • dropping an item on the ground
  • taking an item from the creative inventory menu
  • destroying (trashing) an item

Methods ​

__construct() ​

php
public function __construct(\pocketmine\inventory\transaction\InventoryTransaction $transaction)

getTransaction() ​

php
public function getTransaction() : \pocketmine\inventory\transaction\InventoryTransaction

VanillaMine is a fork of PocketMine-MP, maintained by Luxury Nodes. Not affiliated with the PMMP team or Mojang.