diff --git a/src/pocketmine/Player.php b/src/pocketmine/Player.php index 0021ef6fd..1c029855d 100644 --- a/src/pocketmine/Player.php +++ b/src/pocketmine/Player.php @@ -2590,7 +2590,7 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{ if($this->isAlive()){ //reactive damage like thorns might cause us to be killed by attacking another mob, which //would mean we'd already have dropped the inventory by the time we reached here - if($heldItem->onAttackEntity($target) and $this->isSurvival()){ //always fire the hook, even if we are survival + if($heldItem->onAttackEntity($target) and $this->isSurvival() and $heldItem->equalsExact($this->inventory->getItemInHand())){ //always fire the hook, even if we are survival $this->inventory->setItemInHand($heldItem); }