1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

Get a player's max hunger.

Discussion in 'Facepalm' started by RumDaDuMCPE, Jul 14, 2017.

  1. RumDaDuMCPE

    RumDaDuMCPE Witch

    Messages:
    67
    GitHub:
    RumDaDuMCPE
    How can I set a player's hunger?

    I've tried $player->setHunger(count($player->getMaxHunger());
    It does not work. Any help would be greatly appreciated. Thanks.
     

    Attached Files:

  2. RumDaDuMCPE

    RumDaDuMCPE Witch

    Messages:
    67
    GitHub:
    RumDaDuMCPE
    Edit: I need to get the player's max hunger.
     
  3. Zayd

    Zayd Witch

    Messages:
    55
    GitHub:
    ZaydPE
    Why are you counting it? Just set it without, normally...
     
  4. RoyalMCPE

    RoyalMCPE Slime

    Messages:
    87
    PHP:
    $player->setFood($player->getMaxFood());
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.