From 6756203aec533979dd0f8d31f41669676c934b27 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Mon, 10 Jun 2019 16:54:45 +0100 Subject: [PATCH] InventoryTransaction: Added a warning about ordering --- .../inventory/transaction/InventoryTransaction.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/pocketmine/inventory/transaction/InventoryTransaction.php b/src/pocketmine/inventory/transaction/InventoryTransaction.php index 55219fac6..f5d67be74 100644 --- a/src/pocketmine/inventory/transaction/InventoryTransaction.php +++ b/src/pocketmine/inventory/transaction/InventoryTransaction.php @@ -75,6 +75,11 @@ class InventoryTransaction{ } /** + * Returns an **unordered** set of actions involved in this transaction. + * + * WARNING: This system is **explicitly designed NOT to care about ordering**. Any order seen in this set has NO + * significance and should not be relied on. + * * @return InventoryAction[] */ public function getActions() : array{ @@ -271,6 +276,8 @@ class InventoryTransaction{ return false; } + $this->shuffleActions(); + $this->validate(); if(!$this->callExecuteEvent()){