[INACTIVE][MECH] Gastronomic v1.3.4 - Adding realism through hunger. [766]

Discussion in 'Inactive/Unsupported Plugins' started by fullwall, Jan 28, 2011.

  1. Offline


    The first specialised hunger plugin for Bukkit!
    Now with Thirst - open GastronomicWater Spoiler!

    Download latest release: v1.3.4 (Uses Permissions)
    Older Versions: 1.33, 1.31, 1.3, 1.26, 1.25, 1.2, 1.1, 1.0, 0.1
    Direct link to latest: here

    Ever felt like something was missing from Bukkit? A sense of immersion, of depth? Ever felt like people shouldn't be able to survive for weeks without a single piece of food? Gastronomic provides a reason to kill those pigs, catch that fish, and cook that bread. So gather up your [wheatpicked], [redmushroom] and [meat], and keep reading.

    • User-specified hunger intervals, increments, and damage amounts.
    • Per-item hunger restoration amounts.
    • 'Effects' system allowing very customisable health restoration/damage effects.
    • Permissions support.
    Give gastronomic.admin.* support to trusted players, and gastronomic.player.* permissions to all, or configure permissions manually from the list below.
    gastronomic.admin.enable - gives access to the /gastronomic command.
    gastronomic.admin.reload - gives access to the /gastronomic reload command.
    gastronomic.admin.sethunger - gives access to the /sethunger command.
    gastronomic.player.checkhunger - gives access to the /hunger command.
    gastronomic.player.checkfood - gives access to the /food command.
    gastronomic.disablehunger - give this permission to disable hunger for the user/group.
    /gastronomic - enables and disables plugin.
    /gastronomic reload - reloads all configuration files.
    /hunger - checks your current hunger level.
    /sethunger [player name] [hunger level] - sets player's hunger to the specified amount.
    /food [id] - tells the player how much hunger the id restores.
    /food list - lists how much hunger each food id restores.
    Known issues:
    • If configuration files are deleted for any reason, the server may show some scary messages. Don't worry, it should work out fine! If not, report please :).
    • In GastronomicWater, users must left click to empty buckets (bug with bukkit not calling correct events on bucket use)
    Planned Features:
    • Suggest some!
    v1.3.4 - compatibility, bugfixes.
    Older Versions (open)

    v1.33 - bugfixes, permissions are now opt-out
    • Finally fixed hunger saving (!)
    • Lotsa bugfixes (tm)
    • Incremented version number to reflect amount of bugfixes/new features added to 1.2.
    • Player hunger resets to initial-hunger after death.
    • Added enforce-limit setting to stop hunger going below 0 after death.
    • Added hunger restoration settings.
    • Allowed eating cake.
    • Added /food [id] command to get food hunger restoration value. Add gastronomic.player.checkfood to allow access.
    • Messages are now only sent to the player upon reaching the threshold.
    • Lots of bugfixes.
    • Changed the way players are added/removed on join/quit.
    • Added /gastronomic reload command.
    • Added initial-hunger setting to allow users to start at varying levels of hunger.
    • Added Permissions support.
    • Changed versioning scheme to reflect this.
    • Added support for messages with colour codes, as defined in the properties file.
    • Fixed miscellaneous bugs.
    • Hunger values can go below 100.
    v0.1 - initial release.
    Mechanics (open)

    Each player is given a hunger value, starting at 0. Every so often, at a user-specified interval, every user's hunger level goes up by a specified increment. This goes on until their hunger level reaches 100, and they begin to starve. At every following interval, damage will be taken until food is eaten, restoring hunger levels back to 0.
    Credits (open)

    • Firstly to this thread for inspiring the creation of Gastronomic. Thanks to Bashur and the other posters in that thread!
    • Secondly to TimberJaw, whose Hey0 mod (here) served as ideas for some of my plugin's functionality.
    GastronomicWater (open)
    Please note - this is not updated for 766 yet.
    Download link: 1.11, 1.0

    GastronomicWater has exactly the same features as Gastronomic, but with a separated config file.
    Commands are:
    /drink [id]
    /gastronomicwater (reload)
    /setthirst [player name] [thirst]
    gastronomic.admin.enable - gives access to the /gastronomicwater command.
    gastronomic.admin.reload - gives access to the /gastronomic reload command.
    gastronomic.admin.setthirst - gives access to the /setthirst command.
    gastronomic.player.checkthirst - gives access to the /thirst command.
    gastronomic.player.checkdrink - gives access to the /drink command.
    gastronomic.disablethirst - give this permission to disable hunger for the user/group.

    As this is an early release (and my first actual plugin), please report any bugs or issues, and also features you'd like to be added - I'm always open to suggestions! Also taking suggestions for my next plugin.
  2. Offline


    health -= Gastronomic.
    starvedamage; if
    (health == 0 || 0 > health) {
    health = 0;

    = code. That should work for any type of number :S.
  3. Offline


    Okay! So I decided to post a better bug report rather than a few incoherent posts.

    My server:
    Show Spoiler

    1. CraftBukkit #424
    2. MC Beta 1.3_01
    3. Plugins:
      1. [iChat] version [1.5]

      2. [Permissions] version [2.0]

      3. AppleTree

      4. bSwarm version 0.3.2

      5. CrowdControl version 0.17

      6. [DeathTpPlus] version 1.71

      7. [Gastronomic] version [1.25]

      8. LoginMessage 0.4_3

      9. MonsterHunt

      10. Persistence version 0.51

      11. [SpawnMob] Version 1.5.6

      12. Tombstone v.1.0
    • Health warnings work fine, and player takes damage at 100% as usual. I have it set up for 4 hearts of damage. Then player takes the second damage as usual. Putting player at 2 hearts but the plugin won't actually KILL them... then they just stay at 2 hearts forever. If the player eats after this has happened it lowers their hunger level like normal but their hunger does NOT start to go back up again. Tested on multiple damage increments. Something tells me it might be DeathTpPlus or Tombstone interfearing with it. Just a hunch though.
    • Server restart resets players hunger levels.
  4. Offline


  5. Offline


  6. Offline


    How could I know?
  7. Offline


    No! I don't know why it's happening :p.

    Have you tried disabling every plugin *except* for Gastronomic?

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


    No I haven't. Been trying to avoid another test, they take a while :(
  9. Offline


    It seems when the hunger stops working, the "/gastronomic reload" command will re-start the hunger again, without having to restart the server!! w00t
  10. Offline


    yeah this will be the temporary fix I will be using too.
  11. Offline


    Mine stops working randomly as well. As well as people are able to log out and back in and the hunger doesn't save.
    Getting this error code as well when some people leave. It was working until 1.3 just fine.

    Could not pass event PLAYER_QUIT to Gastronomic
    at java.util.Hashtable.put(Hashtable.java:411)
  12. Offline


    Yeah getting the same issues on craftbukki 440
    Will reset to 0 and never move again (unless i reload it)
    getting the Could not pass event PLAYER_QUIT
  13. Offline


    To fix it I'll probably have to start measuring hunger intervals in server ticks.
  14. Offline


    But it is OK, isn't it?
  15. Offline


    ? I'm not sure - test for yourself (I haven't used this in a while). To fix the issue that axebyte is describing (or what I think is the cause) - I'd have to change the interval to server ticks rather than seconds.
  16. Offline


    Im getting this error on the newest craftbukkit builds.
    I think 454+
  17. Offline


    You have to redownload.
  18. Offline


    fullwall, why don't you change the minor version number?..
  19. Offline


    I will now.
  20. Offline


    Im getting an error when im using /sethunger <myname> 0 , to reset my hunger.
    Tried with Craftbukkit 478,480
    I even tried with Craftbukkit 450, because with 1.25 this command was working for me, but with 1.26 it doesnt!

    Here is the log, hope it will help!

  21. Offline


    Can you try redownloading and test again? This is most likely caused by a misspelling of a name - I have added another check that may stop this error.
  22. Offline


    ok give me a minute
    --- merged: Mar 1, 2011 12:16 PM ---
    Similar error with craftbukkit 480 and 450:

  23. Offline


    Try again.
  24. Offline



    same :S tried with 450 and 480

  25. Offline


    Aha. This should fix it - again caused by the refactor.
  26. Offline


    Im here to test it, just tell me when i can download it again ^^
  27. Offline


    Now! XD. Sorry if I wasn't clear.
  28. Offline


    lol sorry :D give me a minute
    --- merged: Mar 1, 2011 12:50 PM ---

    Its working now !!!! Thanks! :p
  29. Offline


    That's OK! I moved a reference around in the refactor, and it was pointing to a different instance of a variable, hence causing the problem. Thanks for spotting it!
  30. Offline


    As my server based on your plugin, im happy to report bugs :p
    And now suggestion time :D
    1. The messages that "your hunger increased to" is showing up every +20%. But some ppl probably use different interval (including me). I use +10%, but the messages still showing up every +20%. I would prefer to see that the messages showing up every +10% IF i use 10% hunger interval.
    What do you think?
    2. Fooood liiiiiist wiiiithh nameeees plssss :p The "/food list" command is really good thing, but i dont think that too many ppl knows what ID is what food -.- Would be great if you could make it with names.
    a, You could just "code in" the names of the IDs, of course not all of them, mainly the eatable items id. I was trying to help, so i uploaded a text file. These items could be eatable, so i didnt add things like cobble etc.. who wants to eat cobble? lol
    b, Add an option in the "Gastronomic.foodstuffs" file, where ppl can add names to the IDs ^^

    Attached Files:

  31. Offline


    Yeah... Configurable intervals are regularly requested, but they're annoying to implement. Maybe. Redownload - changed the id to names.

Share This Page