[MECH] FastFood v0.7 - Eat food instantly, disable hunger, fully customizable [1.4.7-R1.0]

Discussion in 'Archived: Plugin Releases' started by garbagemule, Sep 18, 2011.

  1. Offline

    garbagemule

    FastFood - Eat food instantly!
    v0.7 | Download | Instructions | Source

    Would you like to be able to instantly consume food and regain health like in pre-1.8 Minecraft? Would you like to customize the amount of health regained by food (and even non-food)? Want to disable the hunger bar health regain? Then FastFood is the plugin you're looking for.

    Developed primarily as a supplement plugin to MobArena, FastFood allows you to give players (with certain permissions) the ability to right-click with food and regain health instantly. It allows you to disable the effect of the food bar (so players don't regain health when their food bar is full). All settings and values can be changed from in-game.

    Please read the Instructions for more information on how to use and set up this plugin.

    Note: FastFood only works for players with the correct permissions! As such, the plugin doesn't change anything on the server unless the permissions are given. This is what makes it ideal for MobArena.

    How to use with MobArena
    Using MobArena's per-class permissions, simply give all your classes the permission 'fastfood', like such:
    Code:
    classes:
        Archer:
            items: ...
            armor: ...
            permissions:
            - fastfood
    And you're done.

    Features
    • Instant eat food like in pre-1.8 Minecraft
    • Customize how much health the food heals/damages
    • Regain health independently of the food bar
    • Disable the health regain feature of the food bar
    • Perfect for use with MobArena
    • Supports Heroes
    To-do
    • Fix the known issues.
    Known issues
    • When eating a bowl of mushroom soup, the bowl is not returned.
    Changelog
    v0.7
    • Added support for enchanted golden apples.
    v0.6
    • Updated to Minecraft 1.4.7
    v0.5
    • Cake can now be placed on the ground and consumed as before.
    • Fixed the "spam" error.
    v0.4
    • Added a "root" permission node, 'fastfood', for easier usage.
    • Fixed the error when typing a command without arguments.
    v0.3
    • Updated for CraftBukkit #1240.
    • The only regen events cancelled now are those of the RegainReason.SATIATED reason. This shouldn't change anything in how FastFood works, though.
    Previous versions (open)
    v0.2
    • Updated for CraftBukkit #1185.
    • Added permission 'fastfood.nostarve'. With this set to true, players will not lose health due to starvation.
    v0.1
    • Initial release.
     
    rakiru and RugRats like this.
  2. Offline

    Supuhstar

    well why not? Plenty of other plugins do. Please don't accuse me of not knowing what I'm doing when it is, in fact, your plugin's incompatability with my setup that is at fault.
     
  3. Offline

    garbagemule

    @Supuhstar - Why not? Because it's outdated and inactive - it's being phased out. The author has had the plugin thread locked and stated that it should not be used. The reason other plugins support it is because they haven't made the change yet :) I'm sorry that you take offense, but much more often than not, users really don't know what they're doing, and you not having made the switch to a SuperPerms compatible permissions plugin doesn't really work in your favor. I say it's your setup that is incompatible with my plugin, moreso than my plugin that is incompatible with your setup (the statements are equivalent because incompatibility isn't one-way, but the implied insult is swapped around), seeing as your setup is obsolete, and my plugin follows the defacto standard of permission node handling. If you'd like to discuss this matter further, please send me a PM, as it is getting off-topic.
     
  4. Offline

    xsolar66

    just get Pex or Group manager. Handles both permission systems really well, and still contains the * node for lazy sods like me :)
     
    diannetea and garbagemule like this.
  5. Offline

    Zombiemold

    Love this mod, thank you for doing this. I was glad to see you had Mob Arena in mind as, that is the reason I went searching for a mod that did just this. I needed food to heal for the arena.

    I am having one small problem, and I have one suggestion.

    Firstly, the issue I am having is, right clicking with food in your hand when trying to activate say, a door, or a switch, consumes the food AND activates the target. Typically, mods I use that hijack right click, have some sort of code that allows activating nodes priority, and doesn't start the added function or some such (I don't know the technics or anything, just an observation)

    Secondly, it would be amazing if you added an alternate permission for eating food that makes it non-instant like 1.8, but still heals you like y our mod provides, possibly over the short 3 second or so animation. What do you think?

    Anyway, love the mod, keep up the amazing work.
     
  6. Offline

    Phliz

    @garbagemule - Suggestion- possibly make this tie in more specifically to MobArena. Option to have it only active in the arena?
    Great plugin though, keep up the good work.
     
    BadDog likes this.
  7. Offline

    BadDog

    Hi there garbagemule! This plugin is really neat and I have to say that Phliz made a really good point here. In fact, I came to this thread so as to ask this same feature myself.

    I'll check if there is something in the MobArena plugin config files to grant users temp permissions regarding FastFood, but I'm not sure I'll find anything like that. Having this option in the config for FastFood would make the plugin even better!

    Thanks for your time, coding and help!
     
  8. Offline

    garbagemule

    @Phliz @BadDog - FastFood functions 100% on permissions, meaning it is extremely useful with MobArena's per-class permissions. I thought this was a no-brainer, but I can see how it wouldn't necessarily be for people who don't actually develop the plugins :3 Simply add the FastFood permissions to all MobArena classes and you're good to go.
     
    BadDog likes this.
  9. Offline

    BadDog

    Ho, now that you mention it, it makes sense. I really thought that the "permiclass perms" we can grant to every MobArena class were just the ones related to this same plugin!

    But now that I know that I can add every other plugins' permissions right in this config file, I guess I will try some wicked, twisted, evil things now! :rolleyes: (and of course, grant them the use of FastFood!)

    Thank you very much for your help, I guess my players will love the new features of our arena!

    I installed every permission in each class desciption and it's working quite well right now. Question to be sure, am I doing it right: to set fastfood.nostarve to false, I typed - -fastfood.nostarve (with a dash in front) in the class descriptions. I didn't know if this is what you meant by "false". But I guess it is, since everything is running fine!

    By the way, with this plugin installed and the new WorldGuard healing/feeding flags, our arena has never seen so many fights in one evening and so many players at the same time! This was really fun! So to every user wondering if he/she should add it, go for it, this is really a nice addition to MobArena indeed!

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

    garbagemule

    @BadDog - Yep! You did it exactly right :) I'm so happy to hear the plugins are livening up your server. May I take a look? If yes, you can PM me the address :)
     
  11. Offline

    BadDog

    Of course, I sent you a loooong PM so as to have a pleasant stay (subway explanation, location of the arena, hours when people are online, things and stuff...) In fact, our 2-way and 4-line subway indeed needs a little explaining for the first time using it: you can type a destination and go drink a juice while the plugin and my setup do all the work, taking care of the intersections for you!

    If you happen to visit while I'm online, I'll teleport you inside the arena, and if you'd like, I'll make you fight in it so as to test! My user name is MecchaMatt by the way if you see me.

    I'm proud of our server, thanks to the great plugins we use and the lovely buildings of our members and I'm really happy that you'd like to check it! PM me what you think of the arena! ;)

    Take care and see you around!
     
  12. Offline

    Phliz

    BadDog likes this.
  13. Offline

    BadDog

    Hi back! I've got a console messages-related question:

    1) This one:
    Code:
    [SEVERE] Could not pass event ENTITY_REGAIN_HEALTH to FastFood
    java.lang.NoSuchFieldError: SATIATED
            at garbagemule.FastFood.listeners.FFEntityListener.onEntityRegainHealth(FFEntityListener.java:49)
            at org.bukkit.plugin.java.JavaPluginLoader$74.execute(JavaPluginLoader.java:761)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:338)
            at net.minecraft.server.EntityLiving.c(EntityLiving.java:387)
            at net.minecraft.server.EntityPlayer.c(EntityPlayer.java:209)
            at net.minecraft.server.FoodMetaData.a(FoodMetaData.java:52)
            at net.minecraft.server.EntityHuman.s_(EntityHuman.java:210)
            at net.minecraft.server.EntityPlayer.b(EntityPlayer.java:213)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:305)
            at net.minecraft.server.Packet10Flying.a(SourceFile:126)
            at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:92)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:108)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:464)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:374)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:417)
    
    2) This other one:
    Code:
    [WARNING] Unexpected exception while parsing console command
    org.bukkit.command.CommandException: Unhandled exception executing command 'ff' in plugin FastFood v0.3
            at org.bukkit.command.PluginCommand.execute(PluginCommand.java:41)
            at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:163)
            at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:353)
            at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:349)
            at net.minecraft.server.MinecraftServer.b(MinecraftServer.java:499)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:478)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:374)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:417)
    Caused by: java.lang.NullPointerException
            at garbagemule.FastFood.FFCommands.onCommand(FFCommands.java:36)
            at org.bukkit.command.PluginCommand.execute(PluginCommand.java:39)
            ... 7 more
    
    What do they mean exactly? Since I've got a lot of these in my console, I was wondering if anything important wasn't working well. Maybe it's just related to the fact I'm still running RB 1185, but if it's the case, I'll have to cope up with the error messages as I need to stay with this build for a little while. If you could just tell me if there's something really wrong or not, and I'll be reassured. Many thanks!
     
  14. Offline

    garbagemule

    @BadDog - The first one is indeed due to the fact that you're running CB 1185. If you just use v0.2 of FastFood for now, you shouldn't get those errors. It's basically saying that there's no RegainReason.SATIATED enum, which there is in 1240, but not in 1185. And since v0.3 is compiled against CB 1240, that's the only one v0.3 supports :) The second one looks like a booboo on my part, though. It seems as if I didn't guard against typing /ff without any arguments. Don't worry, the exception is harmless. Just make sure to provide another argument :3
     
  15. Offline

    BadDog

    You are right, I didn't remember that I had typed that, but since I didn't know fastfood commands by heart, I thought that maybe just a /ff would give me a helping reminder but that launched the said message instead. From what I read, I guessed it wasn't very grave, but nonetheless, I always prefer to ask.

    If the RegainReason.SATIATED-related error is also harmless for the time being (just messages in the console), I think it will be ok for a couple of days. I'm glad you're always here to help and to answer so quickly. That's really helpful to us poor admins who don't really know how to code! ;) Just tell me if you need translation work for you plugin (like for the instructions) and I'll be glad to do that to show my gratitude!
     
  16. Offline

    garbagemule

    @BadDog - I wouldn't recommend using v0.3 if you're not on CB 1240. If I'm not mistaken, the auto-regain won't be cancelled when this exception happens. There shouldn't be any other changes from v0.2 to v0.3, so you can safely use v0.2 for some time still :) Translations would be nice, but since a lot of my instructions and Wikis change every so often (as can be seen on the translated announcements files for MobArena), I think it would just turn into a hassle for you in the long run, but thanks for the offer :3 As for the command, it really is a booboo on my part, and I definitely should fix it. Consider it done in v0.4 along with a few other nifty things (once I find the time for it all) :)

    Edit: Oh, and there is nothing more motivating to me than a friendly and relaxed attitude :3 It makes me so much more eager to update my plugins, because it reminds me that there are very nice people out there enjoying them :)
     
  17. Offline

    Taxen0

    first off, thanks for a great plugin, I use it together with mobarena.
    The only thing I noticed is that I can't eat cake placed on the ground.
    I have the mobarena permissions set up as the following for each class:
    Code:
    - -mobarena.use.leave
    - modifyworld.*
    - fastfood.instanteat
    - fastfood.nostarve
    - -fastfood.autoregain
    I can eat regular food to get hearts and don't regenerate any hearts over time.
    but nothing happens when I right-click the cake, and I don't get any errors in the console either.

    I use the latest rb of everything, and use the default config of fastfood.

    thanks again for a wonderful addon!
     
  18. Offline

    garbagemule

    @Taxen0 - Check the known issues section of the main post ;)
     
  19. Offline

    Taxen0

    @garbagemule It is not specified in the file (I use the default file), I can place the cake correctly but when I right-click on it (when it is placed) nothing happens.

    sorry for the confusion.
     
  20. Offline

    garbagemule

    @Taxen0 - Ah, I see, the known issues entry isn't complete. Since cake is not considered as a special case, simply eating cake will work as if it was simply 1.8+ regardless of permissions and settings. Thus, just eating cake normally will boost your food level instantly.
     
  21. Offline

    Taxen0

    @garbagemule - ok, thanks for clarifying that. I guess there is no fix for the issue yet?
    in the mean time I will simply remove the cake from the arena.
    keep up the good work!
     
  22. Offline

    garbagemule

    @Taxen0 - There is a fix, but I don't have time to fix it at the moment :(
     
  23. Offline

    Taxen0

    @garbagemule - take your time, it will be great to use cake for your "healer class" once it's in, but there is no rush.
    the arena is still a hundred times better with this addon!
     
  24. Offline

    bitRAKE

    I'm having the hardest time getting this to work. If I am not using the permissions.yml file, then will this mod work? Do I need to put some kind of settings into the permissions file? Sorry for the ignorant question, but I don't really understand how to use the permissions files. I just want to remove hunger. I guess I need to set instanteat nostarve and autoregain: false. Not sure how this is supposed to be done, and I can't find any clear documentation on the bukkit permissions.

    Thanks!
     
  25. Offline

    garbagemule

    @bitRAKE - Don't apologize for the "ignorant" question - we were all new to this at one point :) I gotta say I don't actually know if the permissions.yml file will work or not. FastFood won't work "out of the box", meaning you actually do need a permissions plugin (or if permissions.yml works, you don't), or some other way to assign the permissions, to get the effects from the plugin - reason being, I wanted it to be a supplement plugin for MobArena moreso than a standalone plugin that changes things server-wide. Look into getting PermissionsEx, bPermissions or PermissionsBukkit, and take your time with finding out how everything works. I think you'll find the most instructions/guides for PermissionsEx or bPermissions :)
     
  26. Offline

    bitRAKE

    Ah I see. So bukkit's default permission system might not work, and I just need to get one of those permission mods. Thank's for the help. I just run a server for my friends and I absolutely hate the new hunger system, so this seemed like a way to get the old behavior back.
     
  27. Offline

    BadDog

    @garbagemule
    Ok, I think I'll upgrade to 1240 then. I was just worried that something would not work right and waited a bit for plugins to update too. But I guess every plugin developer must have a rhythm of their own and that some will not get their work update until quite a time. That's the lot of every server admin! :p

    No problem for the translations, I understand, if it is to change several times in a short time, I guess it's better to wait until the time when your plugins are not subject to such frequent edits (but knowing a bit how Notch and the Bukkit team work, I guess it won't be that soon!). You know I'm here if need be!

    And you're welcome for the kind comments and thankful approach, you are the one taking time to write code and help us poor souls in need of light when it comes to plugins! So that's the least we can do. I have to say though that your plugins' threads rarely show ungrateful comments and bad spirit. That's not only due to the visitors but thanks to you: you're quite the helping kind, taking the time to understand our issues and willing to admit when you did a mistake. That's rare and I'd like to write it down here! You and Mike Primm from the dynmap project are two really helpful fellows!

    So now that I've been waxing lyrical here, I'm off to upgrade our server!
     
  28. Offline

    add1ct3dd

    I'm getting LOADS of errors on 1240, i assume you know about them?
    :( hope it's updated soon :)
     
  29. Offline

    Schlumpf

    Hello,
    really nice, it work on my Server. Using #1240. This is just awesome with MobArena :).
    But I got 1 question. Is there a way to add cakes?? As it was in 1.7 that you place the cake on the ground with right click and then you eat the cake with left click. Click for Click you eat a bit of the cake.
    Is this possible?
     
  30. Offline

    BadDog

    @Schlumpf
    The problems with cakes are well known, as you can see in the "known issues" in the original post. At the moment, you can just wait until garbagemule has the time to check this issue.
     
  31. Offline

    Uzalu

    Noticed an error, just updated to CB 1317, this happens when i right click while looking at a block:

    Code:
    2011-10-13 03:33:06 [SEVERE] Could not pass event PLAYER_INTERACT to FastFood
    java.lang.NullPointerException
        at garbagemule.FastFood.listeners.FFPlayerListener.onPlayerRightClick(FFPlayerListener.java:75)
        at garbagemule.FastFood.listeners.FFPlayerListener.onPlayerInteract(FFPlayerListener.java:58)
        at org.bukkit.plugin.java.JavaPluginLoader$11.execute(JavaPluginLoader.java:330)
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:339)
        at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:171)
        at net.minecraft.server.ItemInWorldManager.interact(ItemInWorldManager.java:265)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:592)
        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:92)
        at org.getspout.spout.SpoutNetServerHandler.a(SpoutNetServerHandler.java:500)
        at net.minecraft.server.NetworkListenThread.a(SourceFile:108)
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:471)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:374)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:417)
    Noticed plenty of references to spout there, i did just re-add spout to the server, i will try removing it and edit this with the result :)

    Great plugin by the way!
    -uzalu

    EDIT: Still happens after spout is removed. Here is the new error code:

    Code:
    java.lang.NullPointerException
        at garbagemule.FastFood.listeners.FFPlayerListener.onPlayerRightClick(FFPlayerListener.java:75)
        at garbagemule.FastFood.listeners.FFPlayerListener.onPlayerInteract(FFPlayerListener.java:58)
        at org.bukkit.plugin.java.JavaPluginLoader$11.execute(JavaPluginLoader.java:330)
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:339)
        at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:171)
        at net.minecraft.server.ItemInWorldManager.interact(ItemInWorldManager.java:265)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:592)
        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:92)
        at net.minecraft.server.NetworkListenThread.a(SourceFile:108)
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:471)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:374)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:417)
     

Share This Page