HealthbarX
Information
This plugin is a continuation of this inactive project: http://dev.bukkit.org/server-mods/healthbar/
This adds a health bar above player's heads using Spout.
Usage: Simply place the jar file into your plugin directory then optionally edit the config file to customize the healthbar display.
Important note
Expect more major changes (especially configuration changes) as I diverge more from the original project.
Configuration
On start up the plugin automatically creates a config.yml file in the HealthBar folder. This contains the following properties:
bar: # Character used to make the healthbar character: '|' # Format used for the healthbar. # Note: Use the format &&<hex> for all color codes # Current variables (note: some, but not all, variables have bar forms): # {health},{health_bar} = the player's current health # {max_health} = the player's maximum health # {health_percent} = the player's current health percentage (without % sign) # {missing_health},{missing_health_bar} = the player's maxhealth - current health # {lost_health},{lost_health_bar} = the amount of health the player has lost since the last healthbar update # {gained_health},{gained_health_bar} = the amount of health the player has gained since the last healthbar update # {mana},{max_mana},{mana_percent},{missing_mana} {mana_bar},{missing_mana_bar} = same as their health-based cousins format: '&&9[&&a{health_bar}&&b{gained_health_bar}&&6{lost_health_bar}&&c{missing_health_bar}&&9]' # Controls the size of the healthbar (values under 1.0 work somewhat currently, bars may be added/removed at different levels of health - will be fixed soon) healthScale: 1.0 # A value under 1.0 is recommended for mana - mana/maximum mana tends to be larger than health/maximum health manaScale: 1.0 system: # Controls whether or not to have healthbars only show up for players with a certain permission usePermissions: false hideDuringSneak: true
Change accordingly.
This plugin works with other plugins that edit the title name.
Permissions
To use with permissions you must have a permissions based plugin installed and you must have "usePermissions" as 'true' in config.yml.
Nodes: healthbar.cansee - Allows the player to see other players health bar. healthbar.reload - Allows you to reload the configuration file.
Requirements
SpoutCraft - Client & Server
Optional
Heroes - Uses this plugin's health and mana systems if installed
Source
The source repository is located here: https://github.com/0xFDotOrg/HealthBar-For-Minecraft--Spout-
@Kiak
Yep, I'm aware of the ratio issues and plan to replace them with a bar quota (separate quotas for mana and healthbars of course). It just took me a while to figure out how exactly I wanted to do them, since, unlike other healthbars, mine are composed of multiple, optional elements, it isn't quite as simple as using a percentage of missing health and a percentage of actual health.
One last issue ( or two issues if they're not related)
I use heroes, so my players have 200 hp. No problem i simply set the ratio to 0.05 so that they end up with 10 hp icons.
However they then level up and gain a few more hp and the bar gets out of wack
Can you make it work from a default amount of Icons rather than a ratio of the max health?
In other words a config option for "amount of hp icons to show" and then make the plugin work out the ratio itself?
I found one last Bug which il send you some screenshots to demonstrate.
Update: putting the mana bar on a literal new line in config Didn't work however
enclosing in double quotes "\n" did the trick! hooray.
Thanks buddy.
More Update: your plugin Can do the special characters i've found
If you use this. "\u2665" for the hp bars it makes it a heart :) Peace
@Necavi
You and another guy are both remaking this (see HealthBarsPlus CFZ)
Your version has the mana bars but His version can do special ALT codes in the bars
Example: "\u2665" as the HP bar draws a HEART like the regular MC HP bars.
I feel like i'm making the same requests of both of you and wasting at least one persons time
If you wouldn't be adverse to it.. I encourage you to talk to and collaborate with the other DEV. that way you can avoid doing the same work as another person and maybe get more bang for your time :)
@jhs232
I realized that it likely should work already, give it a try, and if it doesn't I'll compile it for 1.2.5 specifically.
Are you compiling it for 1.2.5 for me? You are my hero!
I'd forgotten about mana issue, I'll likely split those functions up a bit, so that health and mana will be recalculated separately. For some reason it can be a bit tricky to get the newline character to work, allthough if you just place a literal newline character (i.e press enter inside the configuration option), or enclose the statement containing the \n in double quotes rather than single quotes it seems to work.
Edit: Example of a config I use to test things
Hey Mate. Love your work but i've found 2 minor issues for you to check out.
@jhs232
Have you actually tried it with 1.2.5? Thinking about it there's just about no reason I can think of that it wouldn't work, unless the heroes interface is different.
It should just be matter of recompiling it with the newer bukkit at most.
Great plugin, I'd love for it to be updated when 1.4 bukkit comes out :)
Do note that the version with mana hasn't been approved yet, that's in version 1.1.2, however when I get back I'll compile 1.1.2 against minecraft 1.2.5 components for you.
Very nice plugin! :) I'd say that it's definetely better than this: http://dev.bukkit.org/server-mods/healthbarplus-cfz/ Yours has support for Heroes mana and it has a lot more configuration! Love it! Just one thing. Does this work for 1.2.5?
Simply press f5 and you should be able to see your own healthbar. It hasn't been extensively tested in multiplayer yet, and I have noticed a bug where you won't have a title when you first login, but I'll be fixing that shortly.
That's the problem, I can't see it in Third Person (F5). But it doesn't matter, I think I'll wait for an update ;) .
Hmm...the issue seems VERY oddly intermittent, I haven't done anything that might have fixed it, and yet it seems to have stopped being an issue again, but I'll keep my eye on it.
Recently I haven't been able to replicate this issue at all, perhaps some of my various changes have fixed it, it'd be worth trying some of the newer versions.
Thank you!!!
But I have some bugs: Sometimes I see players healthbar and sometimes not(I think after reconnects).
How can I see my own healthbar?
SpoutPlugin: b1369
SpoutCraft: b1845