Plugin category: Fun/Information Suggested name: Boss Bar Health What I want:My idea for this plugin is really simple: When you hit a player, it shows his healt like ender dragon's healt (in health bar top up). At the place where it says Ender Dragon it will be the player name (configurable like "bossname: &9&l%player%" ) and under it, there will be the player health. 10 hearths max ==> every time you remove half a hearth of player's health it will remove 5% of the boss bar. When you don't hit the player configurable time, the boss bar dissapear (default "healthremovetime: 6") When you hit creative player, you don't get the health bar. When tou hit mob it could show the bar (Configurable "showmobhealth: true/false") The bonus healths (yellow hearts or when the hearts are more than 10) the plugin will ignore them and dont remove 5% of the boss health, when it goes to 10 it starts to remove % from the bar. Commands: bosshealth reload - reload the plugin Permissions: bosshealth.reload - to reload the plugin bosshealth.see - to see the health bar on hit Op default have this permissions When I'd like it by: as soon as possible. Sorry for my bad english. Its not my first language. If you dont understand something, post below.
Bump Just tell me is it possible.. I really want this plugin. I know its hard but it will be very cool for battle minigames or for factions/pvp servers
This shouldn't be too difficult, and I might give it a try, but I'm new to Bukkit programming and there are no promises I'll get it to work.
ZeaL_BG I'm close to done, but I need to test what I've written to make sure it works. GEOFBOT I got it to work with a hardcoded delay before the bar disappears. I'll set up config and permissions next. The health bar is triggered by projectiles and melee hits, and updates when the enemy player heals. EDIT by Moderator: merged posts, please use the edit button instead of double posting.
Thanks a lot dude! When you upload download link I'll test it too and if there are any buggs I'll told you here.
ZeaL_BG Here's a link: https://www.dropbox.com/s/nqfhlu8k6v76zxk/BossBarHealth.jar Could you test it out with the permissions (bossbar.*, bossbar.use, bossbar.config, bossbar.deny) I'll try to put it up on dev.bukkit.
The plugin load, but not working. When I load the plugin and barapi at the same time bar api isnt working. When I load barAPI first and then add the plugin to the plugins forge and load it doesnt work again, but barapi is loaded. Not working without barapi. When I load the plugin and then barapi, its not working again. I try at 1.7.9 and 1.7.2. I try to turn on/off and again on but nothing. Players have the needed permission. No error in the console from this plugin. When I load the plugin for first time the config was empty and I reset it.
timtower So instead of shading in BarAPI I should just reference it? ZeaL_BG I think it's a problem with the permissions. I'll try to fix it up.
I'm just letting you know it's possible as I made it and I'm running it on my server. However, I'm not making it public, so unfortunately you'll have to get it from someone else.
timtower Thanks for the advice, I got it working. Turns out I also somehow accidentally forgot to include a permission in plugin.yml and accidentally deleted a line registering events. ZeaL_BG BossBarHealth v1.1: https://www.dropbox.com/s/nqfhlu8k6v76zxk/BossBarHealth.jar Hope it works this time!
ZeaL_BG You're using 1.7.2, but I'm building using 1.7.9, so some features don't transfer over. Lemme see if I can change some things around so it still works. ZeaL_BG Is there any way you upgrade to 1.7.9? If I convert all uses of UUID to String, then I will probably have to include UUID lookups because of getPlayer(String) deprecation. Most plugins from 1.7.2 should work on 1.7.9 (I know at least BarAPI does) EDIT by Moderator: merged posts, please use the edit button instead of double posting.
Thanks, guys. It's working now. The only think that left is: Is it possible to make the message up configurable?
daavko timtower Ok, I changed UUID to String after reading more about the deprecation. (UUIDs not necessary unless saving player data) This also increases compatibility with old versions of Bukkit. ZeaL_BG New link: https://www.dropbox.com/s/nqfhlu8k6v76zxk/BossBarHealth.jar (This version is compatible with older versions of Bukkit) Configuring the header message should be relatively easy. ZeaL_BG Here is BossBarHealth v1.3. You can configure the text above the boss bar using the "prefix" and "suffix" fields in config.yml. Note that if you want to make bold text, italics, etc, you have to surround the prefix text with quotes. For example: Code: expireticks: 120 enabled: true prefix: "\u00A7lPlayer:\u00A7r " suffix: Makes this appear: EDIT by Moderator: merged posts, please use the edit button instead of double posting.
Everything is nice now, but when I'm on region with no pvp and punch player (no pvp) it shows he is half hearth down at the bar, but he is full.
ZeaL_BG Try out v1.3.2 I changed some messy code to make health readings more accurate. This version should fix your problem. Also BTW: I re-read your original post and I want to point out that the boss bar shows the percentage of health left, so AFAIK it should stay accurate even with the extra hearts from Absorption.