[INACTIVE][MECH] Gastronomic 1.5 (other thread inactive) [818]

Discussion in 'Inactive/Unsupported Plugins' started by jonathanyc, Jun 10, 2011.

  1. Offline

    TelephoneKiosk

    @Spycoclown
    I did that but it still won't work.
     
  2. Offline

    Spycoclown

    try with non admin users normely it should work for them.
     
  3. Offline

    Plague

    please update to latest recommended CB
     
  4. Offline

    Spycoclown

    Code:
    17:30:19 [SEVERE] Unable to save plugins/Gastronomic/Gastronomic.users
    java.io.FileNotFoundException: plugins/Gastronomic/Gastronomic.users (Too many open files)
            at java.io.FileOutputStream.open(Native Method)
            at java.io.FileOutputStream.<init>(Unknown Source)
            at java.io.FileOutputStream.<init>(Unknown Source)
            at com.fullwall.Gastronomic.PropertyHandler.save(PropertyHandler.java:57)
            at com.fullwall.Gastronomic.Hunger.PlayerHunger.updateHunger(PlayerHunger.java:53)
            at com.fullwall.Gastronomic.Gastronomic$1.run(Gastronomic.java:379)
            at org.bukkit.craftbukkit.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:138)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:389)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:312)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    17:30:19 [SEVERE] Unable to save plugins/Gastronomic/Gastronomic.users
    java.io.FileNotFoundException: plugins/Gastronomic/Gastronomic.users (Too many open files)
            at java.io.FileOutputStream.open(Native Method)
            at java.io.FileOutputStream.<init>(Unknown Source)
            at java.io.FileOutputStream.<init>(Unknown Source)
            at com.fullwall.Gastronomic.PropertyHandler.save(PropertyHandler.java:57)
            at com.fullwall.Gastronomic.Hunger.PlayerHunger.updateHunger(PlayerHunger.java:53)
            at com.fullwall.Gastronomic.Gastronomic$1.run(Gastronomic.java:379)
            at org.bukkit.craftbukkit.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:138)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:389)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:312)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    17:30:20 [SEVERE] Unable to save plugins/Gastronomic/Gastronomic.users
    java.io.FileNotFoundException: plugins/Gastronomic/Gastronomic.users (Too many open files)
            at java.io.FileOutputStream.open(Native Method)
            at java.io.FileOutputStream.<init>(Unknown Source)
            at java.io.FileOutputStream.<init>(Unknown Source)
            at com.fullwall.Gastronomic.PropertyHandler.save(PropertyHandler.java:57)
            at com.fullwall.Gastronomic.Hunger.PlayerHunger.updateHunger(PlayerHunger.java:53)
            at com.fullwall.Gastronomic.Gastronomic$1.run(Gastronomic.java:379)
            at org.bukkit.craftbukkit.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:138)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:389)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:312)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    17:30:20 [SEVERE] net.minecraft.server.MinecraftException: Failed to check session lock, aborting
    17:30:20 [SEVERE]       at net.minecraft.server.PlayerNBTManager.b(SourceFile:76)
    17:30:20 [SEVERE]       at net.minecraft.server.World.k(World.java:2128)
    17:30:20 [SEVERE]       at net.minecraft.server.World.w(World.java:189)
    17:30:20 [SEVERE]       at net.minecraft.server.World.save(World.java:179)
    17:30:20 [SEVERE]       at net.minecraft.server.World.doTick(World.java:1612)
    17:30:20 [SEVERE]       at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:392)
    17:30:20 [SEVERE]       at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:312)
    17:30:20 [SEVERE]       at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    17:30:20 [SEVERE] Unexpected exception
    net.minecraft.server.MinecraftException: Failed to check session lock, aborting
            at net.minecraft.server.PlayerNBTManager.b(SourceFile:76)
            at net.minecraft.server.World.k(World.java:2128)
            at net.minecraft.server.World.w(World.java:189)
            at net.minecraft.server.World.save(World.java:179)
            at net.minecraft.server.World.doTick(World.java:1612)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:392)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:312)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    17:30:24 [SEVERE] Exception in thread "Thread-12"
    17:30:24 [SEVERE] java.lang.NullPointerException
    17:30:24 [SEVERE]       at com.floyd.bukkit.petition.NotifierThread.run(NotifierThread.java:36)
    
    i get this message if somebody leaves my server
     
  5. Offline

    jtlcr777

    (sorry if this has been posted before)

    If I remember correctly the old version had an "effects" file that made raw pork poison the player. Can you give me what to write in that file so I can get that effect on my server? Because it doesn't generate that file on startup.

    To sycoclown:
    Code:
    FileNotFoundException: plugins/Gastronomic/Gastronomic.users (Too many open files)
    That means your server cant find the file "Gastronomic.users", which stores the hunger level of each player.
     
  6. Offline

    jonathanyc

    Hi!
    Sorry, I thought you were gone (which was why chernobyl360 took up the plugin). It's great to hear that you're not gone - I'm sorry, I should have checked more.
    I know this may seem a little late, but can I use your plugin's name/code? The current version I am working on right now has basically been built from scratch, but the handlers are heavily inspired by yours.
    Thanks, and sorry if I caused offense. :(
     
  7. Offline

    Spycoclown

    But the file is there and this error comes only if nobody is online, 5min exactly after the last player goes.
    this message crushe the hole server, it dont work anymore and i have to restart the server.
     
  8. Offline

    jonathanyc

    Alright, while I await a reply from fullwall I am uploading my alternative Hunger plugin called "Hungry" (initially was going to be still called Gastronomic to reduce confusion, but I'll play on the safe side).

    http://icebrg.us/dl/Hungry.jar

    It has its own repository at https://bitbucket.org/jonathanyc/hungry, in case you'd like to contribute.

    It also has a wiki with some information (permissions and configuration).

    Lastly, it has an issue reporter - report new issues there, or in this thread.

    Thanks, and thanks for your patience. ;)

    NOTE: I have tested most features, but some things may still be broken. If they are, and if you report them by the end of today (PST), they should also be fixed by the end of today. :)
     
  9. Offline

    jtlcr777

    Wait so will you be focusing on this gastronomic fork or your new Hungry plugin?
     
  10. Offline

    jonathanyc

    I'll be focusing on the Gastronomic fork if possible, but I'm waiting for fullwall to give me to go-ahead.
    Meanwhile, I'll be working to get Hungry up to the full capabilities of Gastronomic, even adding a tool to port configuration from Gastronomic to Hungry when this is possible.
     
  11. Offline

    jtlcr777

    Seems like a handfull, but thanks! I'm sure plenty of people will appreciate you for you work.
     
  12. Offline

    Fawa

    I currently run with a few modified mods, one of which used to reset the players current hunger level back to the default level. I am having difficultly implementing this with your new Hungry mod, was wondering if be able to aid me?
    Code:
    PlayerHunger.setPlayerHunger(player, 0);
    Is what I used to have. So if there an equivalent method I could use?
     
  13. Offline

    jonathanyc

    Whoa! Thanks for bringing that up - at the moment, there is no special method for doing that, so I'll get to work on that right away.

    EDIT: Actually, I just realized you could do the following:

    Code:
    Plugin hungry = this.getServer().getPluginManager().getPlugin("Hungry");
    
    if (hungry == null) {
        // failed to get the plugin, do something
    } else {
       ((Hungry)hungry).getConfig().playerHungers.put(playerName, 0);
    }
    
    I believe that would be the safest way to do the equivalent (you'd have to add an import for Hungry, as I assume you're doing with Gastronomic, and you'd have to be doing this with the Bukkit server in scope).

    This is possible because all of the configuration is stored in a publicly accessible HungryConfiguration instance - playerHungers is just a HashMap<String, Integer> in it that is loaded from config.json on startup and saved their on shutdown.

    Tell me if this doesn't work, or if you need additional clarification. ;)
     
  14. Offline

    Fawa

    Thanks for the quick reply, just happened to check back randomly, noticed it said you were offline before, guess not. The code works! Sorry for late response, took a little bit of tweaking to get it implemented, but its finally fully functional. Thanks again for maintaining a functioning "hunger" mod. Much appreciated.
     
  15. Offline

    fullwall

    @jonathanyc - it's fine to use name etc. I just do some work for citizens now.
     
  16. Offline

    azngamerzer

    I am on my knees and worshiping you for forking this =D
     
  17. Offline

    Spycoclown

    Is it Posible to implement that food dont heal? Because if i cut my self with a knife i dont say "hey luckly i have an appel here so it stop bleeding" I would prefer that food only heal my Hunger and not my life.

    My players want it to, the heal with Bandage ;)
     
  18. Offline

    MisanthropX

    Whenever I start the server, it does generate all the files. but they are empty..

    Code:
    12:33:37 [INFO] plugins/Gastronomic/Gastronomic.foodstuffs not found! Creating empty file at plugins/Gastronomic/Gastronomic.foodstuffs.
    12:33:37 [INFO] plugins/Gastronomic/Gastronomic.properties not found! Creating empty file at plugins/Gastronomic/Gastronomic.properties.
    12:33:37 [INFO] plugins/Gastronomic/Gastronomic.users not found! Creating empty file at plugins/Gastronomic/Gastronomic.users.
    12:33:37 [INFO] plugins/Gastronomic/Gastronomic.effects not found! Creating empty file at plugins/Gastronomic/Gastronomic.effects.
    

    so erm.. what am I supposed to set if I get only empty files?
    A preset example would be awesome, would be better more than:

    #Minecraft Properties File
    #Tue Jun 14 12:33:37 UTC 2011

    which is pretty everthing in the file..


    I find nothing in the beginning post about this, nor in the other posts.
    Thanks in advance!
     
  19. Offline

    Tealk

    hi is it possible to add a feature that works together with Jail so that prisoners dont get hungry and die?
     
  20. Offline

    jonathanyc

    I'll check to see if this is possible. ;)

    For now, I recommend you use Hungry, my other hunger plugin. I think I won't be able to continue the fork of Gastronomic while simultaneously working on Hungry, so sorry to break that promise. :(

    That's an example of why I probably won't be able to continue both at the same time. I'm going to be writing a Hungry-Jails plugin which should provide that functionality. It'll be the first of a series of similar mini-plugins to interact with other plugins. ;)

    Also, I'm setting up a Hungry thread along with some other buddies who'll be joining the team. Hopefully, this will prevent Hungry from dying out.

    Thanks!

    EDIT: Set up the Hungry thread, it's available here.
     
  21. Offline

    BioRage

    You have all the proper files, and config details?

    I was working with FW for a little, I have the information and config for poison, and what not.

    Using and older 7xx version, still works for 8xx
     
  22. Offline

    jonathanyc

    Hungry will probably have its own system for these things, but thanks!
     
  23. Offline

    Plague

    still not updated to latest recommended
    title is missing description
     
  24. Offline

    axebyte

    Only issue i have with this is when dealing with this +worldguard/edit. Seems if you dont own the land when you eat it doesnt take away hunger but still heals you. I am not sure if this can be addressed in this plugin or if there is some unknown to me Flag in wg/we that allows the person bypass, build, use allow and so on doesnt seem to work. Why i was hoping it was somthing on this Plugin end that could resolve this issue.

    THis is the foodstuffs
    Code:
    #Gastronomic Food Settings File
    #Author: Fullwall
    
    #The amount of hunger restored per item is configured here.
    
    #NOTE: If a block id is configured as a food item, every time you use it (not place it)
    # it will restore hunger and the stack amount will lower by 1.
    # This DOES NOT WORK for non-food items, as cheap hackery would be too evident (EG. Tools etc.).
    # If you can think of a good reason why it should, ask on the forum thread.
    
    #NOTE: If a bucket is specified, note that it will only restore hunger if arm is swung, as a bug in bukkit prevents the normal way from happening naturally. It will empty the bucket as well...
    
    # OPTIONAL: To change item health restoration per item, just add a : to the end of the hunger value
    # and then put your new hunger restoration value in. If the item is already a food item,
    # please take into account already existing health restoration effects.
    
    #Apple
    260=20
    
    #Mushroom Stew
    282=100
    
    #Bread
    297=30
    
    #Raw Pork
    319=15
    
    #Cooked Pork
    320=40
    
    #Golden Apple
    322=100
    
    #Raw Fish
    349=20
    
    #Cooked Fish
    350=50
    
    #Cake - each time you eat a piece on the ground you will restore this amount of hunger, so be careful!
    354=100
    this is the prop
    Code:
    #Gastronomic Settings File
    #Author: Fullwall
    
    # Whether the plugin is activated. true/false
    active=true
    
    # How much each user's hunger goes up by every interval. (Any number, but hunger is capped at 100)
    hunger-increment=1
    
    # How much a user is damaged if they're starving (1-20)(1 = half a heart).
    starve-damage=6
    
    # What hunger level new players start at, and what you return to after death. (can be negative, capped at 100)
    initial-hunger=0
    
    # Interval between hunger updates. Measured in server ticks. 20 ticks - 1 second.
    interval=900
    
    # If true, hunger cannot go below 0 after eating - use to stop people 'stocking up' on hunger.
    enforce-limit=true
    
    #If true, player will restore health as defined in the variables below.
    restore-health=false
    
    # If restore-health amount is on, when player hunger is below health-restore-limit,
    # player will regain this amount of hearts (1-20, 1 is worth half a heart)
    health-restore-amount=1
    
    # Hunger Limit for health restoration - when player hunger reaches this limit and restore-health is on,
    # the player will stop regaining health.
    health-restore-limit=20
    
    # Messages are configured here and are sent at the indicated hunger level.
    # For best results, don't put any spaces after the equals sign and before the text, and don't use any quotation marks.
    # Color codes are at the bottom.
    
    # OPTIONAL: Add these to your messages to display something.
    # +hunger+ - display hunger.
    # +name+ - display player name.
    # +health+ - displays your health.
    # +healthr+ - displays health-restore-amount.
    
    message-20=§dYou feel a bit peckish.
    
    message-40=§dYour stomach rumbles.
    
    message-60=§dYou're getting hungry.
    
    message-80=§cYour stomach aches from hunger.
    
    message-100=§4You are starving! Eat something, anything!
    
    message-eat=§dYou feel better after eating. Your hunger is now +hunger+.
    message-stuffed=§dYou feel stuffed, like you couldn't eat another bite.
    
    message-no-permission=§4You don't have permission to use that command.
    
    message-check-hunger=§dYour current hunger is +hunger+.
    
    message-health-restore=§dYour health is restored by +healthr+.
    
    # Color Codes are as follows; put them into your message!
    # §0 = Black
    # §1 = Navy
    # §2 = Dark Green
    # §3 = Cyan
    # §4 = Red
    # §5 = Purple
    # §6 = Gold
    # §7 = Light Gray
    # §8 = Dark Gray
    # §9 = Dark Purple / Light Blue
    # §a  = Light Green
    # §b  = Light Cyan
    # §c  = Light Red/Orange
    # §d = Light Purple
    # §e = Yellow
    # §f = White
    
    of course these have my settings but change em up, users is blank until it starts keeping track of people and the effects just says:
    #Minecraft Properties File
    #Sun May 15 21:32:58 MDT 2011
    I never bothered putting any in there.
    Hopefully this is what you where looking for , if not oh well :D

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

    jtlcr777

Share This Page