Boss Bar Health

Discussion in 'Archived: Plugin Requests' started by ZeaL_BG, Jul 19, 2014.

  1. Offline

    ZeaL_BG

    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.
     
  2. Offline

    ZeaL_BG

  3. Offline

    ZeaL_BG

    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
     
  4. Offline

    GEOFBOT

    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.
     
  5. Offline

    GEOFBOT

    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.
    [​IMG]

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 9, 2016
  6. Offline

    ZeaL_BG

    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. :)
     
  7. Offline

    GEOFBOT

  8. Online

    timtower Administrator Administrator Moderator

    GEOFBOT Try to make a hook into barapi instead of putting in the entire plugin.
     
  9. Offline

    ZeaL_BG

    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.
     
  10. Offline

    GEOFBOT

    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.
     
  11. Online

    timtower Administrator Administrator Moderator

    GEOFBOT Yes, never shade full plugins, they won't get enabled that way.
     
  12. Offline

    krisdestruction

    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.
     
  13. Offline

    GEOFBOT

  14. Offline

    ZeaL_BG

  15. Offline

    GEOFBOT

    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.
     
    Last edited by a moderator: Jun 9, 2016
  16. Offline

    daavko

    GEOFBOT In 1.7.2 builds, getPlayer(String) is not deprecated...
     
  17. Online

    timtower Administrator Administrator Moderator

    GEOFBOT It is deprecated to get attention to the UUID change
     
  18. Offline

    ZeaL_BG

    Thanks, guys. It's working now. The only think that left is: Is it possible to make the message up configurable?
     
  19. Offline

    GEOFBOT

    daavko timtower Ok, I changed UUID to String after reading more about the deprecation. (UUIDs not necessary unless saving player data) :D 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:
    [​IMG]

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 9, 2016
  20. Offline

    ZeaL_BG

    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.
     
  21. Offline

    GEOFBOT

    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.
     

Share This Page