From 3ca80b353be6a48fcb41a1df79836a3fa597353b Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Sat, 21 May 2022 21:20:11 +0100 Subject: [PATCH] InventoryTransactionEvent: rewrite documentation --- src/event/inventory/InventoryTransactionEvent.php | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/event/inventory/InventoryTransactionEvent.php b/src/event/inventory/InventoryTransactionEvent.php index 7ec8c9023..1d653a5d0 100644 --- a/src/event/inventory/InventoryTransactionEvent.php +++ b/src/event/inventory/InventoryTransactionEvent.php @@ -29,8 +29,17 @@ use pocketmine\event\Event; use pocketmine\inventory\transaction\InventoryTransaction; /** - * Called when there is a transaction between two Inventory objects. - * The source of this can be a Player, entities, mobs, or even hoppers in the future! + * 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 + * + * @see https://doc.pmmp.io/en/rtfd/developer-reference/inventory-transactions.html for more information on inventory transactions */ class InventoryTransactionEvent extends Event implements Cancellable{ use CancellableTrait;