mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 10:22:56 +00:00
Fix calls to undefined method Human->getServer() (#234)
* Fixes sendHeldItem to stop crashes when executing. * Fix server calling for food consuming.
This commit is contained in:
@ -57,7 +57,7 @@ abstract class Food extends Item implements FoodSource{
|
||||
if($human instanceof Player){
|
||||
$human->dataPacket($pk);
|
||||
}
|
||||
$human->getServer()->broadcastPacket($human->getViewers(), $pk);
|
||||
$human->getLevel()->getServer()->broadcastPacket($human->getViewers(), $pk);
|
||||
|
||||
$ev = new EntityEatItemEvent($human, $this);
|
||||
|
||||
|
Reference in New Issue
Block a user