mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-12 14:35:35 +00:00
Fixed a mistake in entity attack handler
This commit is contained in:
parent
fd7fb10223
commit
61cfdac6a1
@ -2386,7 +2386,7 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{
|
||||
if($this->isSurvival()){
|
||||
if($heldItem->isTool()){
|
||||
if($heldItem->useOn($target) and $heldItem->getDamage() >= $heldItem->getMaxDurability()){
|
||||
$this->inventory->setItemInHand(ItemFactory::get(Item::AIR, 0, 1));
|
||||
$this->inventory->setItemInHand(ItemFactory::get(Item::AIR, 0, 0));
|
||||
}else{
|
||||
$this->inventory->setItemInHand($heldItem);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user