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!
@99razvan99
Ok, do not worry, you are very active and this plugin has been requested for months by many people, good work :D
@Newiezz
Yeah, I know the thing with fall damage and there's nothing I can do about it at this moment, and yes I am working on the armor damage too.
@99razvan99
I just actualized to the last spigot version and it worked. Bugs: 1 When taking fall damage it takes heal correctly but does not apply the damage animation or effect. 2 Mobs penetrate armor or do more damage.
The new v0.6 which I've just released should be wayyy less buggy.
@euro1988
Well, I guess I need to release a v0.6 snapshot...
Let's hope it's not that buggy.
0.5 causes players to 1hit kill each other.
@Newiezz
Well, I got not idea, add me on skype ( Id: wowhelp12 ), and I'll give you another version to see if that works...
@Newiezz
Well, I'm just using bukkit with playerbar and some other plugins I've made let me look at the error again.
@99razvan99
I tried it with bukkit and executing only playerbar as plugin and the error keeps apearing. How do you execute it?
@Newiezz
I got no idea what's up with that error it works perfectly fine for me :?
It may be cause of Spigot.
0.5 Bugged, can't even initiate it. http://pastebin.com/bi3veAy8
@Hangjai
Should be compatible, are you using v0.5?
work with Skillapi?http://www.heypasteit.com/clip/16AJ
@Glitchx0R
Umm...
Idk I may add the possibility to change what the health/dragon bar is used for, maybe.
How can i use both bars, default Hearthbar & the PlayerBar? & what about as a XP bar for PlayerBar?
@ltjim007
Hey, I've checked you're review, first, the update time means how often does the player health regen, and btw in v0.4 there's a new config, and in v0.5( waiting for approval ) tons of bug fixes, and no, if the max text size is 64 caracters if it would be longer the game would crash, but I can try to make it kind of move around the bar so, you can see the entire text if you really want to.
And thanks for the review. :D
This is a really awesome plugin! Easy to config as well :D
I have also made a showcase video of it: http://www.youtube.com/watch?v=BKH3nvwGu-Y
Btw is it possible to make the length of the message longer because in the video i used colour codes and not all of the text appeared
Released the new v0.5 waiting for approval!
@AlexSmith49
Potions will work from v0.5!
@AlexSmith49
I will see what I can do about potions and there's nothing I can really do about /heal.