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

Solved set Food bar

Discussion in 'Plugin Help' started by Fritures, Apr 28, 2019.

  1. Fritures

    Fritures Spider Jockey

    Messages:
    47
    Hello, i want to set Food bar of a Player if he moove.
    Can you help ?
    (I just want set Food bar)
     
  2. EdwardHamHam

    EdwardHamHam Skeleton

    Messages:
    962
    GitHub:
    edwardhamham
    What do you mean by "set food bar?" Do you mean changing how full their hunger bar is?
     
    HimbeersaftLP likes this.
  3. Fritures

    Fritures Spider Jockey

    Messages:
    47
    Yes
     
  4. Mr174

    Mr174 Baby Zombie

    Messages:
    187
    GitHub:
    mr174
    Can I get a little more of a description?
    What are you looking for the code that does it
    Or a plugin that can do it?
     
  5. jasonwynn10

    jasonwynn10 Moderator Poggit Reviewer

    Messages:
    1,489
    GitHub:
    jasonwynn10
    In either case, this is the wrong section for both of those
     
    EdwardHamHam and Mr174 like this.
  6. Fritures

    Fritures Spider Jockey

    Messages:
    47
    I want, if a Player moove i set her Food bar
     
  7. ZackyVN

    ZackyVN Baby Zombie

    Messages:
    150
    use PlayerMoveEvent
    Code
    PHP:
    public function onMove(PlayerMoveEvent $player){
     
    $player $event->getPlayer();
     
    $player->setFood(2);
    }
     
    Fritures likes this.
  8. ZackyVN

    ZackyVN Baby Zombie

    Messages:
    150
    And r u sure if u want to do this because it may cause lag for u server
     
  9. jasonwynn10

    jasonwynn10 Moderator Poggit Reviewer

    Messages:
    1,489
    GitHub:
    jasonwynn10
    false
     
  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.