diff --git a/src/inventory/CreativeInventory.php b/src/inventory/CreativeInventory.php index f3943907c..43a8b9a0e 100644 --- a/src/inventory/CreativeInventory.php +++ b/src/inventory/CreativeInventory.php @@ -24,7 +24,6 @@ declare(strict_types=1); namespace pocketmine\inventory; use pocketmine\data\SavedDataLoadingException; -use pocketmine\item\Durable; use pocketmine\item\Item; use pocketmine\utils\SingletonTrait; use Webmozart\PathUtil\Path; @@ -72,7 +71,7 @@ final class CreativeInventory{ public function getItemIndex(Item $item) : int{ foreach($this->creative as $i => $d){ - if($item->equals($d, !($item instanceof Durable))){ + if($item->equals($d, true, false)){ return $i; } }