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

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

  1. Offline

    fullwall

    [​IMG]
    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.

    Features:
    • User-specified hunger intervals, increments, and damage amounts.
    • Per-item hunger restoration amounts.
    • 'Effects' system allowing very customisable health restoration/damage effects.
    • Permissions support.
    Permissions:
    Give gastronomic.admin.* support to trusted players, and gastronomic.player.* permissions to all, or configure permissions manually from the list below.
    Code:
    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.
    
    Commands:
    Code:
    /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!
    Changelog:
    v1.3.4 - compatibility, bugfixes.
    Older Versions (open)

    v1.33 - bugfixes, permissions are now opt-out
    v1.31
    • Finally fixed hunger saving (!)
    v1.3
    • Lotsa bugfixes (tm)
    v1.26
    • Incremented version number to reflect amount of bugfixes/new features added to 1.2.
    v1.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.
    v1.1
    • Added /gastronomic reload command.
    • Added initial-hunger setting to allow users to start at varying levels of hunger.
    v1.0
    • 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]
    /drinks
    /gastronomicwater (reload)
    /thirst
    /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

    Atticusmas

    i got an error:

    21:29:11 [INFO] [Gastronomic]: Can't create or find plugins/Gastronomic/Gastronomic.properties for writing. Error occurred in savedefaults() from onEnable(). Please report!
    21:29:11 [INFO] [Gastronomic] Can't find Gastronomic.properties! Disabling plugin. Error occurred in initsettings(). Please report!
    21:29:11 [INFO] [Gastronomic] version [1.33] (Wholesome) disabled
    21:29:11 [SEVERE] [Gastronomic]: Error in readPlayers(). Please report! Cannot read file plugins/Gastronomic/Gastronomic.users
    21:29:11 [SEVERE] [Gastronomic]: Error in readPlayers(). Please report! Cannot read file plugins/Gastronomic/Gastronomic.users
    21:29:11 [SEVERE] Plugin attempted to register PLAYER_ANIMATION while not enabled loading Gastronomic v1.33 (Is it up to date?)
    org.bukkit.plugin.IllegalPluginAccessException: Plugin attempted to register PLAYER_ANIMATION while not enabled
    at org.bukkit.plugin.SimplePluginManager.registerEvent(SimplePluginManager.java:284)
    at com.fullwall.Gastronomic.Gastronomic.onEnable(Gastronomic.java:98)
    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:118)
    at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:511)
    at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:216)
    at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:94)
    at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:72)
    at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:215)
    at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:202)
    at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:142)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:257)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:375)
     
  3. Offline

    BioRage

    Hey Buddy, Love your plugin, but people say their food are dispearing

    IE PUT IN HOT SLOT AND IT VANISHES?

    Any Ideas?

    Also, is there a way for admins/op to have hunger? I set permissions, but I never get hungry =(


    Also for Thirst, do you need a bucket?

    ***** I FOUND A BUG *********​
    Rather my player on my server did..​

    : If you sleep in bed with a porkchop, and wake up your hunger = 0 :​
    : The Pork Chop Remains :​

    Another Bug
    *****
    If you open door with pork chop, your hunger resets!

    *****

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

    fullwall

    @BioRage, @Zothen - redownload the latest version for fixes to your issues.
     
  5. Offline

    axebyte

    Not sure if you fixed this or not yet.
    OnPlayerQuit was replaced with PlayerQuitEvent
    Other then that seems to be working good again.
     
  6. The version Im using is not the latest but the one before and the hunger stats dont save properly! When Im logged out from our server for a while and log in I start at the "initial-hunger=-100" value, not with the one that should be saved. Couldnt test the latest version yet, but I think you havent touched that part, yet!
    Will give the recent version a go tomorrow!
    Good work, as always!
    cheers!
     
  7. Offline

    BioRage

    Thanks,

    PS is your dp from banjoe kazooe?
     
  8. Offline

    fullwall

    It used to be, yes. Now it's someone else :p. I'll look into hunger saving.
     
  9. I dont know if this has to do with your plugin, but after i enabled your plugin, (v1.33), on my server (cb 670), the server did a save, and this error resulted:
    Code:
    [SEVERE] Could not pass event PLAYER_INTERACT to Gastronomic
    [Error] Minecraft server error. Server will be restarted.
    java.lang.NumberFormatException: For input string: ""
    
    A few seconds later, the server forced a restart. I haven't done aything else but add this mod, and that is the only error i got in the console.
     
  10. Offline

    2insane

    For some reason hunger is not increasing for anyone on my server except for myself (the admin) and any other admins. I have Permissions for players set to gastronomic.player.* and the plugin is active in config.yml. Also I have the latest version 1.33. Am I missing something?

    Thanks
     
  11. Offline

    fullwall

    Yes. Please make sure to check the permissions - you are giving your players player.disablehunger.

    I'm changing that to remove the player. for disablehunger - it caused too much confusion (now it's just gastronomic.disablehunger).

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

    BioRage

    @fullwall

    Question on Thirst, do you need a bucket to drink from?

    Aswell can you see to make a config file to edit ratio of hunger filling please?
    IE:
    Cooked Pork -< 30 Hunger >
    Raw Pork <5, or chance to feel sick?>
    Raw Fish vs Cooked...

    Fun stuff like that? :)

    Thanks.
     
  13. Offline

    fullwall

    I'd love to, but I'm kinda busy with my other plugins for the moment. If anyone wants to contribute, they could always submit a pull request on github.
     
  14. Offline

    BioRage

    Ah, which one? :)

    I like Citizen's a lot, just hope one day MC can fix the skin issue(s).
     
  15. Offline

    fullwall

    Yeah, Citizens mainly :p.
     
  16. Offline

    BioRage

    Right on.. when you get a chance, please look into my request please, RPG style for the win! :)

    Cheers.
     
  17. Offline

    MatCat

    Not sure whats going on here, I installed the plugin and it instantly almost killed everyone, I set it to 1 point of hunger every 300 seconds in in 5 minutes it took off like 100 pts.

    Ok after doing some messsing around I have come to the conclusion that the timer mechanism is a bit off. Also when the plugin is first loaded or config is reloaded it runs the thread, this should not happen until after the specified time.

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

    fullwall

    Mmm.. fixed that instant call thing. Still, did you remember to multiply 300 by 20 to get it into server ticks?
     
  19. Offline

    MatCat

    The config says seconds, so I assumed it's seconds :p So your saying take the number of seconds I want it to be and multiply by 20?

    Also the disabling permission does not work for my admins (Permisssions is set to *), and the health damage works even with god mode on.

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

    fullwall

    I can't support the numerous god mod plugins out there :S. It says above the 'interval' property that 20 ticks = 1 second... If you redownload 1.33, that is fixed (I was trying to alleviate some confusion in admins giving players all permissions and then saying Gastronomic didn't work).
     
  21. Offline

    BioRage

    2011-04-09 13:20:38 [SEVERE] Nag author: 'bekvon' of 'Parties' about the following: onPlayerQuit has been replaced with a new signature, (PlayerQuitEvent)
    2011-04-09 13:20:38 [SEVERE] Nag author: 'fullwall' of 'Gastronomic' about the following: onPlayerQuit has been replaced with a new signature, (PlayerQuitEvent)


    Any Ideas? Minus the Parties.
     
  22. Offline

    Gness

    05:31:50 [SEVERE] Nag author: 'fullwall' of 'Gastronomic' about the following: o
    nPlayerQuit has been replaced with a new signature, (PlayerQuitEvent)
     
  23. Offline

    fullwall

    That's an annoying message that I have actually fixed, it's just not registering with bukkit, which still nags >.>
     
  24. Offline

    neogeek23

    Has the bug about cooked pork chops not being consumed when used while targeting a bed been addressed?
     
  25. Offline

    fullwall

    Yeah, should be. I blacklisted a whole bunch of item IDs, so...
     
  26. Offline

    neogeek23

    ok soon as I have a chance I'll update to 670 (on 617) and pork meat is not being consumed if I'm at full health.

    EDIT:

    My terminal said to nag you (fullwall) about using onPlayerQuit when a newer feature PlayerQuitEvent is useable, so I'm here doing my mindless drone work for the swarm.
     
  27. I think the next douchebag who mentions that should be shot on sight! Damn, check at least a few posts above yours before you shit into every damn thread you find. And if you think I might be impolite - have a look into the mirror and think again! Gosh!
     
  28. Offline

    Tealk

    Hi, i become this message what does it mean?
    git-Bukkit-0.0.0-646-gb61ef8c-b670jnks (MC: 1.4)
    [Gastronomic] version [1.33]

    2011-04-10 17:19:41 [SEVERE] Nag author: 'fullwall' of 'Gastronomic' about the following: onPlayerQuit has been replaced with a new signature, (PlayerQuitEvent)

    And why admins dont get hunger how i fix this?
     
  29. Offline

    BioRage

    @fullwall

    Thanks for the reply.

    @Tealk
    Don't add '*' to admins, you need to set permissions for admins and or mods, in order for them to get hungry.
     
  30. Offline

    Tealk

    I have to list all the other plugins as well as individually
    that is too many ^ ^
    no ather way?

    or is this run?
    - '*'
    - gastronomic.admin.enable
    - gastronomic.admin.reload
    - gastronomic.admin.sethunger
    - gastronomic.player.checkhunger
    - gastronomic.player.checkfood
    dont think
     
  31. Offline

    skillinazn

    This is what I get when someone interacts with something, or is hurt:

    Code:
    17:27:15 [SEVERE] Could not pass event PLAYER_INTERACT to GastronomicWater
    java.lang.NullPointerException
            at com.fullwall.GastronomicWater.Listener.onPlayerRightClickBlock(Lis
    er.java:166)
            at com.fullwall.GastronomicWater.Listener.onPlayerInteract(Listener.j
    :158)
            at org.bukkit.plugin.java.JavaPluginLoader$9.execute(JavaPluginLoader
    va:252)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.
    a:59)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManage
    ava:255)
            at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractE
    t(CraftEventFactory.java:162)
            at net.minecraft.server.ItemInWorldManager.a(ItemInWorldManager.java:
    )
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:447)
            at net.minecraft.server.Packet15Place.a(SourceFile:57)
            at net.minecraft.server.NetworkManager.a(NetworkManager.java:198)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:72)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:100)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:368)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:283)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:375)
    This only applies togastrnomicwater though, any ideas?
     

Share This Page