Commit 4b44cc30 authored by CortexPE's avatar CortexPE Committed by GitHub
Browse files

Fix #833

parent ec5185e0
......@@ -136,7 +136,7 @@ class Cake extends Transparent implements FoodSource {
* @return bool
*/
public function onActivate(Item $item, Player $player = null){
if($player instanceof Player and $player->getHealth() < $player->getMaxHealth()){
if($player instanceof Player and $player->getFood() < $player->getMaxFood()){
$ev = new EntityEatBlockEvent($player, $this);
if(!$ev->isCancelled()){
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment