I have looked at, but there is constanted only this: Code: const CAUSE_ATTACK = 1; const CAUSE_DAMAGE = 2; const CAUSE_MINING = 3; const CAUSE_HEALTH_REGEN = 4; const CAUSE_POTION = 5; const CAUSE_WALKING = 6; const CAUSE_SPRINTING = 7; const CAUSE_SWIMMING = 8; const CAUSE_JUMPING = 9; const CAUSE_SPRINT_JUMPING = 10; const CAUSE_CUSTOM = 11; [CODE] what is hunger?
Used this code and working PHP: public function onHunger(PlayerExhaustEvent $e){if(in_array($e->getPlayer()->getLevel()->getFolderName(), $this->levels){ $e->getPlayer()->setFood(20);$e->setAmount(0);}} }