mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-13 15:05:33 +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($this->isSurvival()){
|
||||||
if($heldItem->isTool()){
|
if($heldItem->isTool()){
|
||||||
if($heldItem->useOn($target) and $heldItem->getDamage() >= $heldItem->getMaxDurability()){
|
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{
|
}else{
|
||||||
$this->inventory->setItemInHand($heldItem);
|
$this->inventory->setItemInHand($heldItem);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user