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:
Blabla
2017-01-07 14:01:26 +01:00
committed by Dylan K. Taylor
parent 3c9db45cf8
commit 02ddcef24e
2 changed files with 3 additions and 3 deletions

View File

@ -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);