removed 2 useless handlers from Player(they were not sending any data to player), fixed bug 158

This commit is contained in:
GameHerobrine 2023-01-31 18:37:32 +03:00
parent a66176b75d
commit ad17a6880a
6 changed files with 10 additions and 17 deletions

View file

@ -35,8 +35,10 @@ class Creeper extends Monster{
if($e->isPlayer() && $action === InteractPacket::ACTION_HOLD){
$slot = $e->player->getHeldItem();
if($slot->getID() === FLINT_AND_STEEL && !$this->isIgnited()){
if($slot->useOn($e) and $slot->getMetadata() >= $slot->getMaxDurability()){
if($slot->useOn($this) && $slot->getMetadata() >= $slot->getMaxDurability()){
$e->player->removeItem($slot->getID(), $slot->getMetadata(), $slot->count, true);
}else{
$e->player->setSlot($e->player->slot, $slot);
}
$this->ignite();
return true;