From 6bc6dd516fb3136b1c4bd35e4ca1de604f4be97b Mon Sep 17 00:00:00 2001 From: kotyaralih <62548070+kotyaralih@users.noreply.github.com> Date: Thu, 6 Jan 2022 05:34:18 -0800 Subject: [PATCH] A possible fix for broken items not being deleted from player's inventory. --- src/Player.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Player.php b/src/Player.php index ac3f768d..3e354afc 100644 --- a/src/Player.php +++ b/src/Player.php @@ -1828,7 +1828,7 @@ class Player{ $target->harm($damage, $this->eid); if($slot->isTool() === true and ($this->gamemode & 0x01) === 0){ if($slot->useOn($target) and $slot->getMetadata() >= $slot->getMaxDurability()){ - $this->setSlot($this->slot, new Item(AIR, 0, 0), false); + $this->removeItem($slot->getID(), $slot->getMetadata(), $slot->count, true); } } }