pocketmine\item\Food::canBeConsumedBy PHP Method

canBeConsumedBy() public method

public canBeConsumedBy ( Entity $entity ) : boolean
$entity pocketmine\entity\Entity
return boolean
    public function canBeConsumedBy(Entity $entity) : bool
    {
        return $entity instanceof Player and $entity->getFood() < $entity->getMaxFood() and $this->canBeConsumed();
    }