mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 02:08:21 +00:00
Added hunger and experience saving
This commit is contained in:
@ -33,7 +33,7 @@ abstract class Food extends Item implements FoodSource{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function canBeConsumedBy(Entity $entity){
|
||||
public function canBeConsumedBy(Entity $entity) : bool{
|
||||
return $entity instanceof Human and $entity->getFood() < $entity->getMaxFood();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user