From 685f5d562b9c3418850fa38768090840fa76265f Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Sun, 26 May 2019 14:48:52 +0100 Subject: [PATCH] DoubleChestInventory: fixed use of void result --- src/pocketmine/inventory/DoubleChestInventory.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/pocketmine/inventory/DoubleChestInventory.php b/src/pocketmine/inventory/DoubleChestInventory.php index 086fc7f4d..9ae689fe2 100644 --- a/src/pocketmine/inventory/DoubleChestInventory.php +++ b/src/pocketmine/inventory/DoubleChestInventory.php @@ -85,15 +85,11 @@ class DoubleChestInventory extends ChestInventory implements InventoryHolder{ $items = array_slice($items, 0, $size, true); } - $leftSize = $this->left->getSize(); - for($i = 0; $i < $size; ++$i){ if(!isset($items[$i])){ - if(($i < $leftSize and isset($this->left->slots[$i])) or isset($this->right->slots[$i - $leftSize])){ - $this->clear($i, false); - } - }elseif(!$this->setItem($i, $items[$i], false)){ $this->clear($i, false); + }else{ + $this->setItem($i, $items[$i], false); } }