PlayerBar
Owners
This plugin is mainly designed as an API but if you use it standalone on your server it will act as a new health system!
Plugin Developers
To use the API just drop the plugin into you're java build path.
API
Functions
PlayerBar.getHealth(player) Will return the health of a specific player.
PlayerBar.getMaxHealth(player) Will return a player max health.
PlayerBar.getMessage(player) Will return the message displayed on a player's bar.
PlayerBar.hasHealth(player) Will return if the player has a bar or not.
PlayerBar.setHealth(player, health, livingEntity, killAble) Will set a player's health, if the player wasn't hit by anything set the livingEntity as null and if the player wont die from the event set the killAble as false.
PlayerBar.updateBar(player, livingEntity, killAble) Will update the bar for a player, leave the livingEnitty as null if the player wasn't hit by something and set killAble as false if the player can't die from the specific event.
PlayerBar.setMainDisplay(player) Will display the bar of a specific player on everyone's screen.
Metadata You can get a players "playerBarHealth" metadata to get his health, if you don't want to use the plugin API it'self!
If you change the damage of the EntityDamageByEntityEvent the damage taken should decrease the player health.
Custom Event
event.getAttacker() Returns the entity which attacked the player, if none will return null.
event.getHealth() Returns the player health after being changed.
event.getMaxHealth() Returns the player max health.
event.getPercentage() Returns player's ..% health.
event.getPlayer() Returns the player triggering the event.
Use "HealthUpdateEvent" to trigger the event!
Configs
Increase Health After Time: true - Set to false if you don't want players to regen hp.
Increase If Player Has Hunger: true - Set to false if you want players always to regen hp.
Health Type: bar - Sets the type of bar which will be used ( bar, normal, text ) [ Keep in mind to restart the server if you change this and you use v0.4! ]
Update Time: 5000 - Set the amount of times for the players to gain hp ( milliseconds ).
Health Increased After Time: 1 - Set the health regenerated every update.
Message: 'You have %health% health and level %level%' - Set's the message on the base ( tags supported: %name%, %level%, %health% , %maxHealth%, %expToLevel%, %food%, %flySpeed%, %speed%).
Default Max Health: 20 - Set's the default max health, which will be set when a player joins for the first time.
Plugins using PlayerBar
Send me a private message with you're plugin if you are using PlayerBar.
What this actually does
If you use this plugin all by it'self it will change the minecraft old healthbar to a new one way more configureable!
Metrics
This plugin utilises Hidendra's plugin metrics system, which means that the following information is collected and sent to mcstats.org:
- A unique identifier.
- The server's version of Java.
- Whether the server is in offline or online mode.
- The plugin's version.
- The server's version.
- The OS version/name and architecture.
- The core count for the CPU.
- The number of players online.
- The Metrics version.
- Opting out of this service can be done by editing plugins/Plugin Metrics/config.yml and changing opt-out to true.
Reminder
This plugins changes the way minecraft health works, keep that in mind!
Thanks, I'll be looking forward to it! I hope it's not too much to ask for a command for displaying a player's health, because if it's going to strictly be an API, that's OK, but I haven't seen any other plugin incorporate this one feature yet. :)
I've added something on the main page to be able to support me without donating, hope to see some support.
What's going on with bukkit, I've released v1.0 2 days ago and still 0 downloads.
@adamk523
Actually at this moment, with the current API, I don't think that possible, but I may add something to the API next version to make it possible.
Excellent, I was really hoping for a plugin allowing more customization over the boss bars!
For non developers like me, is there any way to add a command to make the bar reflect a certain player's health to everyone on the server/in a specific world? I'm working on emulating Team Fortress 2 on my small server, and it would be a really unique and fun minigame to have players gain a large amount of max health and become bosses, much like the "Vs. Saxton Hale" mode. It doesn't necessarily need to change actual stats, but just the option to display a certain player's health to everyone would be fantastic. Would this be easily possible with your API?
Keep up the good work! :D
@99razvan99
alright
@z65703071
First, this plugin isn't only meant to display the health above a player's name it is meant to CHANGE a player's health, so a player is able to have like 200 HP not just the minecraft 20 HP standard.
"Also, I think that show your attacking mob and player health is better." What?
...*Default Max Health: 20*This plugin forces a default max health so that will lower other plugin support of possibility. Also, I think that show your attacking mob and player health is better.
@TheKingFalu
Well, I'm sorry but at this moment, I can't.
Can you add support for http://dev.bukkit.org/bukkit-plugins/item-lore-stats/ ?
I've release v1.0 with support for WorldGuard!
@PsychoKillerPL
Check out the configs!
@StreetkillnHD
I'll try to fix the worldguard bug but I don't think I can fix the one with god mode.
found bugs.
if you have worldguard plugin and disabled pvp on ur server or region.
players still can kill u!
or if your using god mode.
I was wondering if i could instead of having the hp bar maybe like a custom message like " Welcome %Player% To NameOfServer" ??
@TWSSYesterday
Thanks!
@StreetkillnHD
As far as I've tested, yea.
@99razvan99
so should this version fix bugs that i wrote?
Released v0.9 waiting for approval!
@StreetkillnHD
Thanks for reporting the bugs, which were bugs inded, they will be fixed in v0.9/v1.0 idk which one will be the next one.
I've changed the plugin description, slightly.
Better API for the plugin developers.