Fallen Hunger - Don't let hunger slow you down!: Version: v1.1 ATTENTION !!! I will be moving all my plugins to Bukkit Dev soon, And also updating to 1317 so keep an eye on things ^_^ Ever been annoyed by hunger slowing you down by not letting you sprint, Well look no further, Use Fallen Hunger to solve all your hunger related problems This is my first plugin and I was looking for something that was easy but that I could branch off and try new things. Not to mention the new hunger stuff annoys me. So Fallen Hunger came to be, now I am just looking for advice/Constructive criticism please. If you want some new features, let me know and I will try to implement them How To Use Download Place the *.jar in your plugins folder Reload server Type /Hunger Done Features: Allows a player to type in /hunger and solve their hunger issues. Download FallenHunger Source Code -- Coming soon, Getting my git account set up and stuff To-Do Add OP Permissions DONE!!! Set up a scheduler to set food level to 20 every 10-15 seconds Set up a command system to provide the option to toggle the plugin. DONE!!! Changelog: Version 1.1 Removed the onPlayerMoveEvent Added the /hunger command Added Permissions (Default to OP) Getting source up on git Soon ^_^ Version 1.0 First Release
Might what to use a scheduler, get all online players, and set all their levels to 20, that way, if you are afk, they dont loose the food.
I am brand new to java coding, and to tell you the truth.... I have no clue how to do a scheduler, But I will research it promptly. Thank you for the advice
I would make it create a list of all online players every ten seconds, and then set the food level. Edit: This should help http://wiki.bukkit.org/Scheduler_Programming Edit 2: Might want to change slogan to "Never go hungry again"
@steaks4uce Ya, I set it to run on "onPlayerMove" because I didnt think that any other event happened that often, and I wanted to make sure that the player would refresh to 20 food often. Glad to know there is a different way of doing it. Cause I can imagine 20 players moving and some massive lag being created due to the constant reset.
@Plague Sorry 'bout that, I am working on a similar plugin for health, I must have typo'd when writing it, thank you for pointing that out.
Good job on the java coding! This plugin might be good for players who only want a health bar to impact them (as in the previous version) when running in survival mode. Some people really hate the food thing. Otherwise, consider that infinite food functionality is included as part of /god mode in the 1185 update of the essentials plugin (and not needed in creative mode, since there is no food bar). Not trying to be a downer, just making sure you realize that essentials already includes this function. Keep coding!
but you have to keep in mind that not everybody is using essentials. and just for the hunger i dont will install it. so nice plugin. thank you for this
Can anyone test this on a more populated server and let me know if there is any lag problems, I have had no issue with a 15 user server load on 2gb of ded-ram, so I just need to see if anyone else has any results I can compare this too. Thanks tons guys --Fallen_Advent @GravelSocks Alot of people won't use essentials because it comes with more features than they want. Like me for example, I wont use essentials because it interferes with some of my economy and permissions plugins, even when the optional portions are turned off, I like the item giving... and that's about it. I created this plugin because it was quite simple and I thought it would be a good idea, I actually didn't know at the time of release that there was another plugin with the same functionality. So thank you for the constructive thoughts, but I believe this plugin provides the very simple functionality I was hoping to provide to people EDIT by Moderator: merged posts, please use the edit button instead of double posting.
The code isn't clean at all. Giving the players 20 health every time they move makes the server quite slow. You should have used the FoodLevelChange event, like in FoodFiller (the plugin you faked with this) http://forums.bukkit.org/threads/admn-foodfiller-v1-2-dont-get-hungry-again-1185.37425/
@SirAlex , I did not fake anything, I made this all from scratch and also, I am brand new to plugin development and java programming as a whole, So please cut me a little slack. This is my first time doing anything like this. Also, using the FoodLevelChange event is a good idea, That's something I did not consider when thinking of how to do this.
Yep - I understand that not everyone uses (or wants to use) essentials. I was just pointing out that both plugin paths have advantages. Anyway - good start with java - keep going.
Are there any suggestions for features, I need some ideas to work off of, cause I feel that the dev-build I have right now is a non-feature filled version of Food Filler, Yes I changed to the onFoodLevelChange Event because it is much less lag intensive, I am in no way trying to copy FoodFiller in any way, But I do need some ideas for features before I am comfortable with releasing another build.
@Fallen_Advent I don't understand why you made this plugin. FoodFiller (my plugin) is exactly the same but it has more features and permissions. I don't want to say that you shouldn't make any plugin but you should get the idea on your own.
@Daninator1 I wasn't aware that you had made a plugin before I posted this, I am sorry about the annoyance, this plugin will be probably changed into something else soon, but for now it is here, and I am working on new features. -EDIT- I will not be working on super nice features, just simple ones that make the plugin function better
@steaks4uce Of course I can say I made it first! Before I made FoodFiller I looked around in the bukkit plugin list and didn't find any similar plugin.
@Daninator1 There will always be more than one plugin with the same features and to be perfectly honest, alot of them are almost idenical in coding, Take a look at gamemode changing plugins. Almost all require the same line of code to get the job done, its just inevitable. So stop getting all worked up over something that is bound to happen with tons of plugins, What really matters is what features you have (or lack thereof) This plugin simply does 1 thing, thats all its ment to do, I will be implementing a command system and maybe permissions, but that is as far as I plan on taking it. Of course I will be keeping it up-to-date but other than that it does its job and it does it well.
@Daninator1 I agree, code away man Updated to RB#1240 Updated to Version 1.1 Added command /hunger. Added Permissions (default to OP). Removed onPlayerMoveEvent. Removed unneeded code. EDIT by Moderator: merged posts, please use the edit button instead of double posting.
is it possible to lock all player's health to 19, so they can still eat, yet be able to heal as well?
@cyberjacob Sorry for the sudden absence, Yes I could make it to where it would be 19, but honestly, Why do they need to eat if they are already at top hunger?