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

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

  1. Offline

    tr4656

    [​IMG]

    Hungry
    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.

    Highlights:
    • There is actually a need to eat food (like real life)
    • Custom Language support
    Resources:
    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.

    Changelog:
    v0.3.1
    • Fixed eating events not registering when right-clicking on air.
    Credits:
    • 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

    axebyte

    One Question..
    Most server use either WorldGuard or some other Protection thing. People can not eat to regain hunger inside an area they dont own. un-owned is fine, and land they own is fine (even if parented) But on any protect area they cant. This includes Road, Cities,arenas or what ever it may be..
    Is there any thing you can do to fix this? some way around it. Or is this pretty much what we stu with due to the WG functions?
    Also be nice to have a You have eaten notification for instances like this if it cant be fixed.
     
  3. Offline

    thernztrom

    Works with #1000 for me. Time to update the header? :)
     
  4. Offline

    Deltawp

    yes work fine for build 1000 hooah !
    thanks for this plugin ! ! !
     
  5. Offline

    spunkiie

  6. it works? when i edit the config: ERROR new config load blablabla.... why?
     
  7. Offline

    Snaipe

    You have to add your players as members of those regions ( /region addmember ), that should solve the problem, at least for your cities and stuff. ( regions acquired with /region claim would have to be manually edited by the owner or someone with the permission to do so )

    Or, you could use Towny for your region protection, the plugin natively have an 'itemuse' permission config.
     
  8. Offline

    axebyte

    yeah except sadly add member = the ability to build and destroy, i found a work around , with wg with the flag "Use allow "
    Biggest issue now is people eat and it does not show they ate, burp out the new hunger lvl so they have eat check hunger eat check hunger. its no real issue just an annyonce that I kow Fullwalls covered the update to this went nice and smooth. works good except this one small little useful detail :D
     
  9. Offline

    xOSSx

    When I edit the config to do damage and save it, it reverts to default so it does no damage any way to fix this?
     
  10. Offline

    jonathanyc

    This plugin is being worked on, I'll ask tr4656 to update the compatible build number (It's running on our server on #1000).
     
  11. Offline

    Spycoclown

    how about the update.
     
  12. This plugin is still bugged (sometime food level freeze and won't go up or food won't restore hunger level :(
     
  13. Offline

    alfskan

    Code:
    2011-07-22 09:46:00 [SEVERE] Could not pass event PLAYER_INTERACT to Hungry
    java.lang.NoClassDefFoundError: com/nijiko/permissions/PermissionHandler
        at us.icebrg.hungry.HungryPermissions.has(HungryPermissions.java:23)
        at us.icebrg.hungry.Hungry.handlePlayerEat(Hungry.java:100)
        at us.icebrg.hungry.HungryPlayerListener.onPlayerInteract(HungryPlayerListener.java:30)
        at org.bukkit.plugin.java.JavaPluginLoader$10.execute(JavaPluginLoader.java:307)
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:321)
        at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:168)
        at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:139)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:520)
        at net.minecraft.server.Packet15Place.a(SourceFile:57)
        at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:84)
        at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:457)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:367)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    
    I got this error when I interact with MOD`s items
     
  14. Offline

    jonathanyc

    This is caused when you don't have the Permissions plugin - don't worry, the next version has support for PermissionsEx, Permissions, and Bukkit's new default Permissions.
    One of the things already fixed in v0.3.


    I sense hostility. :p The thing is, I have other things that I am currently more interested in and or are more necessary (profitable) than programming Hungry, so please excuse me for the long update. The multiple permissions support above was something I took a lot of time to try to get right, before Bukkit announced default permissions. Getting hunger to always increment properly was another annoying thing to do. Finally, the Effects system was rewritten completely about five times - the current one is pretty much done, and mirror's Bukkit's system.

    Again, I'm sorry for the very long update time, but we're going to try to put all of your ideas into this release in some form or another.

    Thanks for your patience! (donations at icebrg.us/donate/?to=hungry are always welcome, but not neccessary)

    Now that we're on an "implement new features" spree, how do you think this feature should work? Should the amount the starvation damage increases by be configurable?

    Not sure about making the starvation interval different, though. More of these means more synchronization necessary, and more trouble. :(


    Voila!


    Well, perhaps we could add an option to show the hunger level as a percentage, so you could increase it to 200 with no one noticing. ;)


    If this is happening, it's probably because WorldGuard is messing around with things it shouldn't, and the only solution would be the configurable event priority someone else proposed.


    I'm crossing my fingers that I finally fixed this in v0.3.

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

    axebyte

    not sure if you answered this one i dont see it.
    Looking for when you eat something, it shows your new current hunger lvl.
     
  16. @jonathanyc Thanks, is the v0.3 available for download ?

    Most of the time, the error that makes the plugin crash (no more hunger rise and food don't restore hunger) :
    CB 953

    Code:
    2011-07-22 12:58:02 [SEVERE] Exception in thread "Timer-0"
    2011-07-22 12:58:02 [SEVERE] java.lang.IllegalArgumentException: Health must be between 0 and 200
    2011-07-22 12:58:02 [SEVERE]     at org.bukkit.craftbukkit.entity.CraftLivingEntity.setHealth(CraftLivingEntity.java:39)
    2011-07-22 12:58:02 [SEVERE]     at us.icebrg.hungry.HungryTimerTask.run(HungryTimerTask.java:75)
    2011-07-22 12:58:02 [SEVERE]     at java.util.TimerThread.mainLoop(Timer.java:534)
    2011-07-22 12:58:02 [SEVERE]     at java.util.TimerThread.run(Timer.java:484)
     
  17. Offline

    jonathanyc

    Yep: https://bitbucket.org/jonathanyc/hungry/issue/16/add-an-option-to-show-players-how-much


    Interesting... thanks for the help - if hunger doesn't rise after that, that might be the problem! :)

    v0.3 isn't available for download just yet, as I still have 12 more things to finish.
     
  18. Offline

    Faelsel

    why when I modify a line in configuration file i make a [GRAVE] error fo Hungry, and it recreate a standard config?

    I want only to modify (only for now XD)
    "resetHungerAtRespawn": true, ->>>>> False
    but when i modify only that blue word hungry dont like config anymore rewriting again and making a .bak..... please help me :D
     
  19. Offline

    jonathanyc

    Apparently 1.8 will have hunger included...

    [​IMG]

    So after v0.3's done, there probably won't be any more updates. (I'm testing it right now.)

    Poison is written as an "Effect", which is sort of like a sub-plugin that Hungry handles - you just download it separately and put it in an "effects" directory in Hungry's plugin directory, and you're set to go.

    I'm going to test some more, and probably package/release by tomorrow.
     
  20. Offline

    Celtic Minstrel

    Well, even after 1.8 you could keep this alive not as a plugin to add hunger but as a plugin to customize hunger.
     
  21. Could you just release an updated version of the actual plugin ? Without all the new features ?
    I think a lot of people like me just use the standart "you don't eat, you die" feature to make the role play system better (and to make cooks sell food)
     
  22. Offline

    Pomme72

    Hi,

    This plugin don't work at all for me, cause when I make my own configuration, he comes back to his configuration.

    This is my file :

    Code:
    {
      "isEnabled": true,
      "checkInterval": 60,
      "incrementAmount": 1,
      "defaultHunger": 0,
      "maxHunger": 100,
      "minHunger": 0,
      "canStockUpInfinitely": false,
      "starvationDamage": 2,
      "starvationDoesActualDamage": false,
      "resetHungerAtRespawn": true,
      "playerHungers": {
        "pomme72": 10
      },
      "foods": {
        "APPLE": 3,
        "PORK": 5,
        "GOLDEN_APPLE": 1,
        "MUSHROOM_SOUP": 20,
        "GRILLED_PORK": 15,
        "COOKIE": 20,
        "BREAD": 20,
        "COOKED_FISH": 20,
        "RAW_FISH": 5
      },
      "foodBlocks": {
        "CAKE_BLOCK": 8
      },
      "ignoreClickBlocks": [
        "DISPENSER",
        "NOTE_BLOCK",
        "BED_BLOCK",
        "CHEST",
        "WORKBENCH",
        "FURNACE",
        "BURNING_FURNACE",
        "WOODEN_DOOR",
        "LEVER",
        "IRON_DOOR_BLOCK",
        "STONE_BUTTON",
        "JUKEBOX",
        "LOCKED_CHEST",
        "TRAP_DOOR"
      ],
      "messagePrefix": "§e[Hungry] ",
      "messages": {
        "MSG_SAVECONFIG_SUCCESS": "§aConfiguration succesfully saved!",
        "ERR_ONLY_USABLE_INGAME": "§cThis command can only be used by in-game players.",
        "VAR_FOOD_INFO": "§f%s §a restores §f %s §a hunger.",
        "MSG_RELOAD_SUCCESS": "§aHungry succesfully reloaded!",
        "MSG_FOOD_LIST_START": "§a\u003d\u003d\u003d EDIBLE FOODS \u003d\u003d\u003d",
        "VAR_SETHUNGER": "§aSuccesfully set§f %s\u0027s §ahunger to§f %s.",
        "ERR_RELOAD_FAILURE": "§cHungry failed to reloaded!",
        "ERR_INVALID_HUNGER_FORMAT": "§cInvalid format for player hunger!",
        "MSG_TOGGLED_DISABLED": "§cHungry is now disabled!",
        "VAR_FOOD_LIST_ITEM": "§a%s§e : §a%s",
        "MSG_FOOD_LIST_END": "§a\u003d\u003d\u003d END EDIBLE FOODS \u003d\u003d\u003d",
        "VAR_CURRENT_HUNGER_IS": "§aYour current hunger level is §f%s",
        "MSG_TOGGLED_ENABLED": "§aHungry is now enabled!",
        "ERR_NO_SUCH_FOOD": "§cNo food with that name/id was found.",
        "ERR_SAVECONFIG_FAILURE": "§cConfiguration failed to save!"
      },
      "hungerLevelNotifications": {
        "100": "§cVous mourrez de faim!",
        "80": "Votre estomac veut manger!",
        "20": "Vous avez un petit creux.",
        "40": "Votre estomac gargouille.",
        "60": "Vous commencez a avoir faim."
      },
      "hungerLevelNotificationsOnlyOnExact": false
    }
    I save it on the FTP, then I go to my server and I /reloadall. But when I do that, the file comes back to his original configuration :(

    Help please, I really want to use this plugin ! :)

    Ty.
     
  23. Offline

    jonathanyc

    Hungry is written such that if you don't want a feature, you don't have to enable it. :) In fact, all of the new features are disabled by default.


    "/reload"ing the server is, to Hungry, the same as shutting down the server and then starting it back up - the same events are being fired. Therefore, Hungry saves all of its configuration (as it would on a shutdown) then loads it back up, meaning that your original configuration will be overwritten.

    If you wish to reload Hungry's configuration without saving, we have provided the "/hungryreload" command since v0.1. Good luck! :)
     
  24. Offline

    Pomme72

    Thank you for this quick response :) <3

    But don't work :(

    Look my console :

    Code:
    22:55:11 [INFO] [Hungry] Loading configuration...
    22:55:11 [INFO] [Hungry] Loading configuration file...
    22:55:11 [SEVERE] [Hungry] Configuration file corrupt or invalid!
    22:55:11 [SEVERE] [Hungry] Moving old configuration file to config.json.bak...
    22:55:11 [SEVERE] [Hungry] 'Loading' a new, default configuration file...
     
  25. Offline

    axebyte

    @ Pomme72 try removing it completely boot, then add it in again boot, i had something close to what you mention here and it fixed mine
    hope it helps
    It all works fine for me other then what i mentioned before (not autoshowing your hunger when eat,showing that you ate)
     
  26. Offline

    Pomme72

    Thank you for this response, but didn't work at all : same error :

    Code:
    22:55:11 [INFO] [Hungry] Loading configuration...
    22:55:11 [INFO] [Hungry] Loading configuration file...
    22:55:11 [SEVERE] [Hungry] Configuration file corrupt or invalid!
    22:55:11 [SEVERE] [Hungry] Moving old configuration file to config.json.bak...
    22:55:11 [SEVERE] [Hungry] 'Loading' a new, default configuration file...
    Another idea ? :)
     
  27. Offline

    JonasD

    Hi. I've got the same problem on my server. I think, that this plugin doesn't work with Bukkit #1000. Is there another hunger plugin? Gastronomic is also inactive.
     
  28. Offline

    axebyte

    @Pomme72 I see in the load screen you got there
    When you removed it did you remove the .jar and the folders. Forcing it create all new ones. That looks like it found one, when it should of just created. (i may be wrong though)
    @JonasD
    I am on bukkit 1k and it is working great, except for the part i keep mentioning :D about not displaying your new hunger when you eat.
    I am not sure if you guys are just removing the .jar and leaving the folder in plugins for Hunger, but try removing it all completely. Other then that i have no suggestions on that one. Are you not parsing the .json if your making changes.
     
  29. Offline

    TelephoneKiosk

    When will this get updated?
     
  30. Offline

    Pomme72

    Hi,

    Of course, I have removed totally all in the folders plugins, Hungry.jay and the file Hungry, but didn't work :(
     
  31. Offline

    jonathanyc

Share This Page