[MECH] Hungry v0.3.1 - Yet another hunger plugin [1060]

Discussion in 'Inactive/Unsupported Plugins' started by tr4656, Jun 14, 2011.

  1. Offline



    Authors: jonathanyc and tr4656
    Version: v0.3.1

    Hungry adds immersion to Minecraft! There is a reason to actually eat food in order to survive making it more realistic - so gather your food and actually eat so you won’t go hungry.

    • There is actually a need to eat food (like real life)
    • Custom Language support
    Download Plugin
    Contribute at Bitbucket!
    Github Mirror

    Instructions, Permissions and FAQ:
    Our wiki is hosted at Bitbucket, and is available here.
    Quick Links
    To-do list and Known Bugs:
    See our Bitbucket issues page.

    • Fixed eating events not registering when right-clicking on air.
    • Thanks to Fullwall, for his Gastronomic plugin (off which many parts of this plugin were based!)
    • Thanks to chernobyl360, for maintaining Gastronomic after Fullwall stopped (until he got hacked)
  2. Offline


    That's not normal, but I have never seen that bug or the cake bug on my server. Sounds like another plugin is interfering.
  3. Offline


    ok I will look which Plugin is wrong. Can't post all my Plugins, got to much :D
    I got no error or something.

    I deleted now all Plugins. Just Hungry is enabled. And I got still the problem. My Hunger is 70% now and I can eat 50 Porks and maybe after 40 it begins to work. Sometimes I can eat about 128 Porks till it work :p

    Maybe something is wrong with my config:
      "isEnabled": true,
      "checkInterval": 60,
      "incrementAmount": 1,
      "defaultHunger": 0,
      "maxHunger": 100,
      "minHunger": 0,
      "canStockUpInfinitely": false,
      "starvationDamage": 2,
      "starvationDoesActualDamage": false,
      "minHealthByStarvation": 0,
      "resetHungerAtRespawn": true,
      "showHungerLevelAsPercentage": true,
      "hungerLevelNotificationsOnlyOnExact": true,
      "verboseHunger": false,
      "showHungerRestoredAfterEating": true,
      "eventPriority": "Monitor",
      "foods": {
        "APPLE": 100,
        "PORK": 20,
        "GOLDEN_APPLE": 100,
        "MUSHROOM_SOUP": 25,
        "GRILLED_PORK": 35,
        "COOKIE": 35,
        "BREAD": 25,
        "COOKED_FISH": 35,
        "RAW_FISH": 25
      "foodBlocks": {
        "CAKE_BLOCK": 15
      "ignoreClickBlocks": [
      "messagePrefix": "§e[Hungry] ",
      "messages": {
        "ERR_NO_SUCH_FOOD": "§cNo food with that name/id was found.",
        "ERR_INVALID_HUNGER_FORMAT": "§cInvalid format for player hunger!",
        "ERR_RELOAD_FAILURE": "§cHungry failed to reloaded!",
        "VAR_SETHUNGER": "§aSuccesfully set§f %s\u0027s §ahunger to§f %s.",
        "VAR_CURRENT_HUNGER_IS": "§9Your current hunger is §f%s§9.",
        "VAR_FOOD_INFO": "§f%s §a restores §f %s §a hunger.",
        "VAR_FOOD_LIST_ITEM": "§9%s §f%s",
        "ERR_ONLY_USABLE_INGAME": "§cThis command can only be used by in-game players.",
        "MSG_TOGGLED_ENABLED": "§aHungry is now enabled!",
        "ERR_SAVECONFIG_FAILURE": "§cConfiguration failed to save!",
        "MSG_FOOD_LIST_START": "§f--- §aEdible Foods§f ---",
        "MSG_TOGGLED_DISABLED": "§cHungry is now disabled!",
        "MSG_SAVECONFIG_SUCCESS": "§aConfiguration succesfully saved!",
        "MSG_RELOAD_SUCCESS": "§aHungry succesfully reloaded!"
      "hungerLevelNotifications": {
        "0": "Du fuehlst dich voll.",
        "100": "§cDu bist am verhungern ...",
        "80": "Du bekommst Magenschmerzen vor Hunger.",
        "20": "Du bist ein bisschen hungrig.",
        "40": "Dein Magen knurrt ...",
        "90": "Dir wird schwindelig vor Hunger.",
        "60": "Du f�ngst an Hunger zu bekommen."
  4. Offline


    Yeah, thanks. I had figured it would be similar, but I just wasn't sure if there was an extra modifier or just the foods.
  5. I meant, when I right click a cake with food in hand (like bread), I get hunger restore for bread, but the neither cake nor the bread get consumed. (When full health)
    When you do this, and are missing some health, the cake get consumed but you get hunger restore for the bread.

    I don't know if this is expected or something, just telling, I don't know if this is a bug or not :(

    Also, just tested now, starvation damaged and min health is working fine now ! Thank you very much for the work :)

    Found something else that's quite major :
    If you eat when looking at "nothing" (air block) the food consumes, but you don't get restored.
    If you look at any bloc, it works fine.
    Again, I don't know if this is expected / bukkit issue, but that sucks :(
  6. Offline


    Oh, in that case I'll look into both bugs. :)
  7. Offline


    @jonathanyc Hi, excuse me for the up :p but do you have any idea for my problem ?

    My problem : When I edit my config.json, I've tried to /reloadall, /hungryreload, or totally reboot my server, always the same : config.json come back to the default configuration.
  8. Offline


    I get the same problem, I tried to translate the original config file in french, and it doesn't work. I tryed every reload commands, and on the console I can see :

    12:37:00 [INFO] [Hungry] Loading configuration...
    12:37:00 [INFO] [Hungry] Loading configuration file...
    12:37:00 [SEVERE] [Hungry] Configuration file corrupt or invalid!
    12:37:00 [SEVERE] [Hungry] Moving old configuration file to config.json.bak...
    12:37:00 [SEVERE] [Hungry] 'Loading' a new, default configuration file...
    12:37:00 [INFO] [Hungry] Loading configuration file...
    12:37:00 [INFO] [Hungry]Succesfully loaded configuration file!
    12:37:00 [INFO] [Hungry]Hungry succesfully reloaded !
  9. Offline


    I'm having the same issue as Schlumpf here.
    It took me (an admin and Op with '*' permissions) only 2 tries to eat something before my hunger went down, but another player (with 'hungry.player.*' permissions) was at 100% and taking damage, yet no matter how much he ate he stayed at 100%. Others then reported theirs would not change either after eating.
    I had to quickly remove the plugin before all my players started dropping dead of starvation despite eating.
    I was using the default config, except with the normal apple set to a value of 25.

    I couldn't find a definite reason for the problem, but a wild guess was that it was related to some people eating 'stacked' food (which is not normally possible without other plugins), but I couldn't confirm this before having to remove the plugin. :oops:
  10. Offline


    Hmm, I tested it now a bit.
    When you look at a Block (ground or something) and you eat then something it work. But if you look into the air and you want eat you get health as normal but Hungry doesnt work then. It just work when you look on a block next to you.
  11. Offline



    For german people who are to lazy to translate themself:
    Show Spoiler

      "messages": {
        "MSG_TOGGLED_ENABLED": "§aHunger ist eingeschaltet!",
        "VAR_SETHUNGER": "§aErfolgreich§f %s\u0027s §aHunger auf§f %s gesetzt.",
        "VAR_CURRENT_HUNGER_IS": "§9Aktueller Hunger: §f%s§9.",
        "ERR_ONLY_USABLE_INGAME": "§cKann nur von In-Game-Players benutzt werden.",
        "VAR_FOOD_INFO": "§f%s §a beseitigt §f %s §a Hunger.",
        "MSG_SAVECONFIG_SUCCESS": "§aconfig erfolgreich gespeichert!",
        "ERR_SAVECONFIG_FAILURE": "§cConfig konnte nicht gespeichert werden!",
        "ERR_NO_SUCH_FOOD": "§cKein Essen mit diesem Namen/ID wurde gefunden.",
        "MSG_RELOAD_SUCCESS": "§aHungry erfolgreich geladen!",
        "VAR_FOOD_LIST_ITEM": "§9%s §f%s",
        "MSG_TOGGLED_DISABLED": "§cHungry ist nun deaktiviert!",
        "ERR_RELOAD_FAILURE": "§cHungry konnte nicht geladen werden!",
        "MSG_FOOD_LIST_START": "§f--- §aEssbare Nahrung§f ---",
        "ERR_INVALID_HUNGER_FORMAT": "§cUngueltiges Format fuer Hungry!"
      "hungerLevelNotifications": {
        "0": "Du bist satt.",
        "100": "§cDu bist am verhungern!",
        "20": "Du bist etwas hungrig.",
        "80": "Dein Magen schmerzt vor Hunger.",
        "40": "Dein Magen knurt.",
        "60": "Du wirst echt hungrig."
  12. @Pomme72 @God0x Vous avez du faire une erreur dans la traduction, évitez les accent et n'oubliez pas d'échapper les apostrophes (par exemple : j''ai et pas j'ai)
  13. Offline


    salut arno00, j'ai tout bien vérifié, et puis j'ai pris le fichier par défaut et j'ai juste remplacé a un endroit "false" par "true" et le fichier est corrompu... :/

    PS: j'adore tes vidéos Youtube, et ton serveur =)
  14. Offline


    That was another of my guesses after looking at the config, I saw it mentions when 'not' to apply the food to hunger levels with relation to which object/block you were looking at.

    Is there anything which would prevent you from removing hunger when looking at no block?
    Is this fixable via the config?
  15. Offline


    I have many of the same bugs others have experianced:
    Eating sometimes doesn't work at all.
    It NEVER works if you're facing the sky.
    It only seems to work for me if I'm facing down in fact.
    It is not displaying a message when health reaches one of the notification levels no matter what the config settings.
    The only message I get is the "You are starving!" message.

    I spent like an hour and a half looking through your source code and for the life of me I don't understand why it will only work if the block you are looking at is very close. I have tested it with my own build and it baffles me! It shouldn't matter if the block is close or not.

    I thought it might be because getTargetBlock required close proximity, but that doesn't seem to be the case.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: May 16, 2016
  16. Offline


    Our server is also experiencing an issue where it works for some people but for others no matter how much they eat, their hunger level remains at 100% (ie: starving) and they lose health.
  17. Offline


    Also saw the problem of reducing hunger.
    I watched the codes and looked fine, but there's a problem with bukkit.
    Bukkit does not send
    RIGHT_CLICK_AIR events. I did a few tests. Nothing appears when I click in air.
  18. Offline


    Read 2 posts up...
    Looking at the floor when you eat seems to help.
  19. Offline


    I also tested the RIGHT_CLICK events and I could not get it to work. I didn't spend much time on it so I just figured I was doing something wrong.

    Right, he handles it seperately for when you eat and it hits a block and when you eat and it hits air. There is obviously something wrong with the air part.

    I noticed it only works with the block selection box is selecting a box. If it's not, it won't select a block. This may have something to do with the RIGHT_CLICK events or it may have something to do with getTarget. I couldn't figure it out in an hour.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: May 16, 2016
  20. Offline


    I don't know how I must configure that, that I the harts disapeer without zombies=true and pvp=true.
    I don't want to have zombies or pvp, but it's not good if the live is restoring.
    Ther File Structure is on my Server:
    Server/Plugins/Hungry/effects/config and data
    Is that normal that in the hungry file are two json files and in every other file is nothing?
    Pls Help! :D
  21. Offline


    That's interesting... the opposite of a previous bug. ;) Sorry, I'll look into it - I haven't had much time recently...

    It might be because Bukkit's event handlers are a bit weird - thanks for checking through the source. ;D If you find a fix on your own, feel free to ask and I'll give you r/w premissions to the repository. :) PLAYER_INTERACT apparently doesn't catch all interactions. :(

    Interesting, I'll look into this too.

    And for all the people having problems with translation, are you sure you're saving in the UTF-8 character set? Most text editors should detect this automatically, but Notepad may have problems. If you save to UTF-8 and if your format is correct, Hungry should load the configuration file properly.
  22. Offline


    sooo what do i press to eat the food ? i'm right clicking it but its healing me not decreasing my hunger?
  23. Offline


    Currently you just need to have your cursor pointing at a black where there's a selection outline on it for the plugin to register you using the food towards hunger and not just health.
  24. Offline


    Can you add something to allow Ops to be skipped in hunger? Or a setting to exclude a specific user from being hungry? One of my members said they are getting hungry and food doesn't help and staved to death eating all food types. I'm investigating what happened. Maybe his stomach had a hole in it.
  25. Offline


    As was stated in the previous post, make sure a block is selected within the cursor when eating food. Easiest method currently is to just look at the ground and eat.

    You can remove the hungry.player.hunger node from an individual's or group's permission's list and they will not suffer hunger.
  26. Offline


    I don't even see that node in the permissions anywhere.
  27. Offline


    toggling hunger doesnt turn it off or on. Also when i eat stuff it doesnt reduce hunger lol ....
  28. Offline


    I don't know how I must configure that, that I the harts disapeer without zombies=true and pvp=true.
    I don't want to have zombies or pvp, but it's not good if the live is restoring.
    Ther File Structure is on my Server:
    Server/Plugins/Hungry/effects/config and data
    Is that normal that in the hungry file are two json files and in every other file is nothing?
    Pls Help! :D
  29. Offline


    Hunger is gonna be added in 1.8, just so you all know.
  30. Offline


    Sorry guys, vacationing with family. Thanks to everyone who has been helping others out with the plugin when I can't. :) You are much appreciated for giving, instead of just expecting to receive...

    I'll be back by Wednesday to work more on the plugin - it's just that I am kind of cautious of extending Hungry when hunger will be added in 1.8 (as I said several pages ago, and as TelephoneKiosk decided to restate last post).

  31. Offline


    I'm having problems with this plugin. I really love it, but sometimes when we eat we don't lose hunger.
    That is frustrating. Why is this happening and can it be fixed?

    Thanks in advance

Share This Page