Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to change the food saturation level in server

Comments in 'Plugin Development' started by LunFeng, Oct 6, 2015.

  1. LunFeng
    Offline

    LunFeng New Member

    Joined:
    Jan 2, 2015
    Posts:
    1
    I want to code a plugin to change the food saturation level in my server just like the LifeBoat SurviveGames.Anyone know how to do?
  2. Creeperface
    Offline

    Creeperface Notable Member Plugin Developer

    Joined:
    Nov 8, 2014
    Posts:
    1,346
    Plugins:
    4
    Minecraft User:
    CreeperFace
  3. Hotshot_9930
    Offline

    Hotshot_9930 Notable Member Plugin Developer

    Joined:
    May 26, 2014
    Posts:
    665
    Plugins:
    2
    Minecraft User:
    HotshotHD
  4. Creeperface
    Offline

    Creeperface Notable Member Plugin Developer

    Joined:
    Nov 8, 2014
    Posts:
    1,346
    Plugins:
    4
    Minecraft User:
    CreeperFace
    I know but it help him. And i think he must know packet id
  5. Kvetinac97
    Offline

    Kvetinac97 Active Member Plugin Developer

    Joined:
    Nov 17, 2014
    Posts:
    276
    Plugins:
    1
    Minecraft User:
    Kvetinac97
    I think that it's impossible until PocketMine will add HungerBarRefill etc. to the code
    Last edited: Oct 7, 2015
  6. Muqsit
    Offline

    Muqsit Active Member

    Joined:
    Sep 9, 2015
    Posts:
    175
    Minecraft User:
    Muqsit
    *impossible *actually possible
    Try WilliamTDR's Katana project! It has bugs like...the signs aren't visible etc. It doesn't save the world too!
    https://github.com/williamtdr/Katana
    Kvetinac97 likes this.
  7. Kvetinac97
    Offline

    Kvetinac97 Active Member Plugin Developer

    Joined:
    Nov 17, 2014
    Posts:
    276
    Plugins:
    1
    Minecraft User:
    Kvetinac97
    Yes, this is possible. But you can't do it in normal PocketMine.
    zombie_Power likes this.
  8. Creeperface
    Offline

    Creeperface Notable Member Plugin Developer

    Joined:
    Nov 8, 2014
    Posts:
    1,346
    Plugins:
    4
    Minecraft User:
    CreeperFace
    You can ;) everything is possible
  9. Creeperface
    Offline

    Creeperface Notable Member Plugin Developer

    Joined:
    Nov 8, 2014
    Posts:
    1,346
    Plugins:
    4
    Minecraft User:
    CreeperFace
    Katana is from normal pocketmine too xD
  10. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Actually, PocketMine has implemented the Attributes API. However, I admit that it is really terrible. You can do little using that API, but I believe that that API allows you to change hunger.
    As for sending packets, it is a bad idea because PocketMine itself sends Attribute update packets as well, and they would compete with each other and confuse the player.
  11. Creeperface
    Offline

    Creeperface Notable Member Plugin Developer

    Joined:
    Nov 8, 2014
    Posts:
    1,346
    Plugins:
    4
    Minecraft User:
    CreeperFace
    so can i change xp using atributes?
  12. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Yes, according to the source code, but there may be a trick needed.
    I used addAttribute for Katana, not sure how it works on PocketMine mcpe-0.12

Share This Page

Advertisement