Custom Health
Description
Create poisonous apples. Kill players when eating cake. Heal them when eating spider eyes. This and much more is possible with the Custom Health plugin.
You can decide, what should happen when someone eats his lunch. It's up to you to reward or punish the players by adding potion effects, change how much the food items should heal or harm him and if he should be set on fire.
You are also able to disable automatic heart regeneration, maximize the amount of food bars that can be filled up and turn your server into a classic, pre-Beta 1.8 released minecraft experience. These are just some of the possibilities you can use in order to customize your server for your own needs.
Note that this plugin is still in its Beta stage. In the past major updates, the configuration file had to be restructured again, be aware that this could happen as well in future releases. If you happen to notice any bugs or have suggestions and ideas for improvements, let me know in the comments below.
Features
- Disable regeneration when food bar is filled up
- Maximize the amount of food bars that the player can fill up through eating
- Change the amount of hearts that the player can have (v0.7 and up)
- Disable "food bar loss" (player will never be hungry)
- Apply the same amount of hunger bars and/or xp when player dies and respawn
- Change mechanics of eaten food items:
- Amount of hearts restored (can be negative)
- Amount of food bars refilled (can be negative as well)
- Amount of saturation added (could also be negative)
- Add potion effects (including strength, duration and chance percentage)
- Add other effects (including explosions, giving xp,... full list here)
- Set it world specific or create custom items
Set Up
When putting the jar file into the plugins folder, the directory "plugins/CustomHealth/worlds" will be created with a template configuration file to work with. If you don't do anything with it, nothing will interfere with the vanilla mechanics.
Commands and Permissions
Arguments in brackets ("[amount]") are optional and don't have to be specified.
To use all permissions, you can say customhealth.commands.* .
The official command at the beginning is /chealth, aliases are /ch or /customhealth.
Command | Permission | Description |
---|---|---|
/ch create [amount] | customhealth.commands.create | Create new config file in the worlds folder. Calls it "groupA.yml", "groupB.yml", etc. until "groupZ.yml" |
/ch set<#> | customhealth.commands.set | Set the data value for item in hand. Custom item can be created in-game. |
/ch rename <from> <to> | customhealth.commands.rename | Rename configuration files. Does not have to include the ".yml" at the end. |
/ch reset | customhealth.commands.reset | Reset everything to its original value. (asks you twice before making this decision) |
/ch reload | customhealth.commands.reload | Reload the plugin. |
/ch plugin | customhealth.commands.plugin | Get information about plugin name, version, author, website and if there's an update available. |
Update checking can be disabled in the config.yml file!
check-for-updates: false
Configuration
Check out the whole configuration file here.
Read more about additional effects.
To Do
Known Bugs
No known bugs. Keep this list updated and send me a ticket for any other bugs you find!
Ideas
- All-you-can-eat
- Values for permissions
- Split "inventories" between worlds
- Your ideas here
Supporting Me
For Users
I like to have active users for this project, who give me suggestions on what to add, tell me what they like and what bugs they find.
For the next large update, there will be a dynamic permission system added and I will need someone who is willing to take the time to test out the development builds.
For anyone interested in this "job" can write an application letter as a private message to me that contains the following information:
- Name (not required)
- Country
- Have you been hosting a bukkit server before? (private or public, owner or admin, anything that included plugin and permission management)
- How are we going to communicate with each other? (e-mails, skype, I need a way to send you the development builds)
Thanks to anyone considering to help.
For Developers
I'm currently not searching for another developer to program with, but the Source code is available for free to anyone interested. You can contact me, if you find some issues in there that could be improved.
It's not fully commented yet, but I'll work on it.
Hey! I love the idea for this plugin. I was hoping you could enlighten me on how I would go about getting more of the new item that I just created. It seems as though I cannot go and type /ch set 2000 (therefore assigning the value of 2000 to, lets say an apple) and later continue to type /give BTK7 2000 1. I am not sure that this is how you intended it to be used but I was hoping for a way to have items with godly powers that I could hide around a map. Any help would be great. Again, I love the plugin already.
@geigenmusikant
Hey, I just wanted to let you know that I haven't forgotten about your plugin. I've been able to do a bunch of fun things with it, and I'll always be grateful for your receptiveness. Thanks a lot! :)
@TWSSYesterday
Doesn't HeroChat have an alias besides ch? Use something that lets you create aliases and change /ch to always use whatever herochat's is
I'm still using this plugin and it is amazing! I only wish there was a way to turn potions into drinks so I could make like, soda or coffee - I currently use mushroom soup bowls but ehh.. :)
@TWSSYesterday
The official command is actually /chealth - /ch and /customhealth are aliases.
@geigenmusikant
Perhaps you could look at a potion-based plugin like this one to see how it handles times and potion effects. If what you say is true, this plugin should have some sort of "workaround" for it, because it lets you enter any duration for any potion effect, and it'll give the right duration.
Or maybe there's a weird quirk in your code? Actually, I'll be happy to test out developer builds you push out (I should've volunteered quite awhile ago). I have a testing server on my personal computer, so it shouldn't be hard or tedious for me to do some in-depth testing.
@diannetea
No, your assumption is absolutely correct. It is supposed to be set in seconds, but for some reason, bukkit applies effects with different durations for different effects.
At least in my testings, when I did [REGENERATION/3/60; FAST_DIGGING/3/60], it gave me 57 seconds of regeneration and 6 minutes of haste. God knows why...
I'll try to figure out a work-around, but other than that there's no other way than just playing around to find the correct timings. I'm sorry for any inconveniences that way.
I'm a little confused as to how time is being calculated. I had originally assumed it was seconds, but with this:
DAMAGE_RESISTANCE/2/10
I get 35 seconds of resistance.
Is that supposed to happen?
@CommodoreAlpha
I'm slow too, don't worry.
The latter is what I meant, but I am now using ItemAttributes which actually has a health value built in, so it's not really necessary ;)
The food system is more than amazing though, so that's fine with me :)
@diannetea
Sorry for the late response.
Different restoration values (hunger and health) for the same food, depending on the permission node one has, should be possible in the future.
If by "health permission levels", you mean the above, then yeah, it's currently being implemented, although the developer is pretty busy right now. If you meant that as in this plugin, then the answer would either be "no", or "not anytime soon", because the plugin is more about making food effects dynamic. Although, given the name, I would like to see health-altering features one day, too.
Curiously, could this be used to create custom foods with different data values? (because that would be awesome)
Still trying to find something that does that :(
edit
okay so I think it does what I want to with food, but it does not do what I want it to do with health (different amounts with permissions) :(
(okay seriously the food thing is amaaaaaazing..)
could it be possible to add health permission levels to this?
@OriginalMadman
I believe the latest version released so far (v0.7) has support for worlds. Go to the plugin's folder, then within that folder, open up the "worlds" folder. In there, there should be one or more .yml files - those are configuration files that each apply to its own "group" of worlds (e.g. groupA applies to 'world' and groupB applies to 'world_nether' and 'world_the_end').
Open up any one of them (or one, if you only have one) and look for a section where you see "worlds:". There, add the world(s) that you want the configuration to apply to. If you want different rules for different worlds, copy and paste the .yml file, then edit away.
If you're still confused after my instructions, pm me and I'll explain with better clarity.
Hi, any news on a worlds aware version of the plugin? Keen to test it here.
@ryan_the_leach
That should be easy to do. Thanks, I'll do that!
Could you possibly add a min-food-level setting? I'm trying to prevent starving from impacting your health at all and instead make it change your speed, high food = sprinting and low food = slowness?
@geigenmusikant
Thanks! I plan to switch to this plugin when/if you have the worlds- and respawning settings implemented. Then it will be just what I need (and a bit more). Come check out our server some day too (we currently run another health/food control plugin, but it has other issues).
@CommodoreAlpha
You've just made a programmer as happy as he could be. Thanks so much for notifying me, I would be more than happy to play on a CustomHealth-based server. :D
Had it not been for Mojang updating faster than rabbits reproduce, I wouldn't be in this depression of a hiatus. :|
But when I do build my new computer (after black friday), I'll get out of this hiatus and run my server (with your plugin) right away. Thanks so much for this, it's one of my "core" plugins. :)
And as a side note, I'll also look forward to changing the effects of salmon, goldfish, and pufferfish to something more interesting...
@wesleyd0g
You're right, the health system changed a bit and I didn't notice it yet. The problem is, once the current hp + the added hp is over the maximum that the player can take, the game will not change the hp at all. If you use low numbers like 1 or -1, it'll work, but I'll make sure to fix that bug!
I dont see get more hp when eating golden apple, no hp will add.
worlds:
world
settings:
regain-health: true
max-food-level: -1
change-food-level: true
food:
golden_apple:
hearts: 15
food: 7
saturation: 9.6
@wesleyd0g
Sorry, I don't quiet understand what you mean. Do you just don't get any healing effects when eating a golden apple? Does the hp not get higher than 15 or more at any time? Why does the hp stop at 15?