From 3be83e09f2f4928297be3c85ded0ac1263c0dace Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Mon, 1 Jun 2020 13:51:36 +0100 Subject: [PATCH] Revert BC-breaking backport from b38c81c96 this can't be applied to a minor version because it places additional requirements on the Inventory contract. --- src/pocketmine/inventory/BaseInventory.php | 7 ------- src/pocketmine/inventory/Inventory.php | 5 ----- 2 files changed, 12 deletions(-) diff --git a/src/pocketmine/inventory/BaseInventory.php b/src/pocketmine/inventory/BaseInventory.php index 94933099d..434495cfc 100644 --- a/src/pocketmine/inventory/BaseInventory.php +++ b/src/pocketmine/inventory/BaseInventory.php @@ -372,13 +372,6 @@ abstract class BaseInventory implements Inventory{ } } - public function swap(int $slot1, int $slot2) : void{ - $i1 = $this->getItem($slot1); - $i2 = $this->getItem($slot2); - $this->setItem($slot1, $i2); - $this->setItem($slot2, $i1); - } - /** * @return Player[] */ diff --git a/src/pocketmine/inventory/Inventory.php b/src/pocketmine/inventory/Inventory.php index dd81b272a..f950b73af 100644 --- a/src/pocketmine/inventory/Inventory.php +++ b/src/pocketmine/inventory/Inventory.php @@ -152,11 +152,6 @@ interface Inventory{ */ public function clearAll(bool $send = true) : void; - /** - * Swaps the specified slots. - */ - public function swap(int $slot1, int $slot2) : void; - /** * Gets all the Players viewing the inventory * Players will view their inventory at all times, even when not open.