Spigot 【BossBarHealth】- Best RPG Health Bar on Spigot ! 4.1.6-SNAPSHOT

Didn't find a plugin that shows health on boss bar? This is it!

  1. Can you add a setting that make the enemy that out of range don't show the bossbar?
    (If an enemy leave 20 blocks away for example,bossbar will disable when the mob walk out of range)
     
  2. Could you create an option to change the message from lang.yml
    when player enter command /bbh show or /bbh hide? This is really necessary to me, pls
    BossBarHealth -> Showing health bar. <== THIS
     
    • Agree Agree x 1
  3. @i998979 There is an error with the name of NPC (Citizens). Can you fix it?
    An error occurs when the name of the NPC is more than 16 characters long

    upload_2021-1-24_0-31-25.png
     
  4. i998979 updated 【BossBarHealth】- Best RPG Health Bar on Spigot ! with a new update entry:

    Citizens support

    Read the rest of this update entry...
     
  5. The support for Citizens was added. You may check the newest version.
    Please read the changelog carefully when updating. Otherwise, it will have no effect and everything will remain the same.
     
    • Like Like x 1
  6. upload_2021-2-1_22-54-6.png
    Line2= Ender Dragon's Chinese name, that's repeated with bbh bossbar.
    Can you add a method to disable vanilla bossbar?Thanks!
     
  7. There is no way (or i'm dumb) to disable vanilla boss bar afaik.
    If you have any ideas how to disable it you may tell me here.
     
  8. Can we have a per-world settings and/or a permission for using the commands such as bossbarhealth.show ? thanks a lot :)
     
  9. oh, i found an error when i hit a player:

    [23:02:42] [Server thread/ERROR]: Could not pass event EntityDamageByEntityEvent to BossBarHealth v4.1.4-SNAPSHOT
    org.bukkit.event.EventException: null
    at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:319) ~[spigot-1.16.5.jar:3029-Spigot-79d53c2-e9ad7cb]
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[spigot-1.16.5.jar:3029-Spigot-79d53c2-e9ad7cb]
    at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:589) ~[spigot-1.16.5.jar:3029-Spigot-79d53c2-e9ad7cb]
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:576) ~[spigot-1.16.5.jar:3029-Spigot-79d53c2-e9ad7cb]
    at org.bukkit.craftbukkit.v1_16_R3.event.CraftEventFactory.callEvent(CraftEventFactory.java:244) ~[spigot-1.16.5.jar:3029-Spigot-79d53c2-e9ad7cb]
    at org.bukkit.craftbukkit.v1_16_R3.event.CraftEventFactory.callEntityDamageEvent(CraftEventFactory.java:959) ~[spigot-1.16.5.jar:3029-Spigot-79d53c2-e9ad7cb]
    at org.bukkit.craftbukkit.v1_16_R3.event.CraftEventFactory.handleEntityDamageEvent(CraftEventFactory.java:846) ~[spigot-1.16.5.jar:3029-Spigot-79d53c2-e9ad7cb]
    at org.bukkit.craftbukkit.v1_16_R3.event.CraftEventFactory.handleEntityDamageEvent(CraftEventFactory.java:802) ~[spigot-1.16.5.jar:3029-Spigot-79d53c2-e9ad7cb]
    at org.bukkit.craftbukkit.v1_16_R3.event.CraftEventFactory.handleLivingEntityDamageEvent(CraftEventFactory.java:991) ~[spigot-1.16.5.jar:3029-Spigot-79d53c2-e9ad7cb]
    at net.minecraft.server.v1_16_R3.EntityLiving.damageEntity0(EntityLiving.java:1861) ~[spigot-1.16.5.jar:3029-Spigot-79d53c2-e9ad7cb]
    at net.minecraft.server.v1_16_R3.EntityHuman.damageEntity0(EntityHuman.java:922) ~[spigot-1.16.5.jar:3029-Spigot-79d53c2-e9ad7cb]
    at net.minecraft.server.v1_16_R3.EntityLiving.damageEntity(EntityLiving.java:1238) ~[spigot-1.16.5.jar:3029-Spigot-79d53c2-e9ad7cb]
    at net.minecraft.server.v1_16_R3.EntityHuman.damageEntity(EntityHuman.java:839) ~[spigot-1.16.5.jar:3029-Spigot-79d53c2-e9ad7cb]
    at net.minecraft.server.v1_16_R3.EntityPlayer.damageEntity(EntityPlayer.java:847) ~[spigot-1.16.5.jar:3029-Spigot-79d53c2-e9ad7cb]
    at net.minecraft.server.v1_16_R3.EntityHuman.attack(EntityHuman.java:1162) ~[spigot-1.16.5.jar:3029-Spigot-79d53c2-e9ad7cb]
    at net.minecraft.server.v1_16_R3.EntityPlayer.attack(EntityPlayer.java:1777) ~[spigot-1.16.5.jar:3029-Spigot-79d53c2-e9ad7cb]
    at net.minecraft.server.v1_16_R3.PlayerConnection.a(PlayerConnection.java:2146) ~[spigot-1.16.5.jar:3029-Spigot-79d53c2-e9ad7cb]
    at net.minecraft.server.v1_16_R3.PacketPlayInUseEntity.a(SourceFile:74) ~[spigot-1.16.5.jar:3029-Spigot-79d53c2-e9ad7cb]
    at net.minecraft.server.v1_16_R3.PacketPlayInUseEntity.a(SourceFile:13) ~[spigot-1.16.5.jar:3029-Spigot-79d53c2-e9ad7cb]
    at net.minecraft.server.v1_16_R3.PlayerConnectionUtils.lambda$0(PlayerConnectionUtils.java:28) ~[spigot-1.16.5.jar:3029-Spigot-79d53c2-e9ad7cb]
    at net.minecraft.server.v1_16_R3.TickTask.run(SourceFile:18) ~[spigot-1.16.5.jar:3029-Spigot-79d53c2-e9ad7cb]
    at net.minecraft.server.v1_16_R3.IAsyncTaskHandler.executeTask(SourceFile:144) ~[spigot-1.16.5.jar:3029-Spigot-79d53c2-e9ad7cb]
    at net.minecraft.server.v1_16_R3.IAsyncTaskHandlerReentrant.executeTask(SourceFile:23) ~[spigot-1.16.5.jar:3029-Spigot-79d53c2-e9ad7cb]
    at net.minecraft.server.v1_16_R3.IAsyncTaskHandler.executeNext(SourceFile:118) ~[spigot-1.16.5.jar:3029-Spigot-79d53c2-e9ad7cb]
    at net.minecraft.server.v1_16_R3.MinecraftServer.bb(MinecraftServer.java:1051) ~[spigot-1.16.5.jar:3029-Spigot-79d53c2-e9ad7cb]
    at net.minecraft.server.v1_16_R3.MinecraftServer.executeNext(MinecraftServer.java:1044) ~[spigot-1.16.5.jar:3029-Spigot-79d53c2-e9ad7cb]
    at net.minecraft.server.v1_16_R3.IAsyncTaskHandler.awaitTasks(SourceFile:127) ~[spigot-1.16.5.jar:3029-Spigot-79d53c2-e9ad7cb]
    at net.minecraft.server.v1_16_R3.MinecraftServer.sleepForTick(MinecraftServer.java:1028) ~[spigot-1.16.5.jar:3029-Spigot-79d53c2-e9ad7cb]
    at net.minecraft.server.v1_16_R3.MinecraftServer.w(MinecraftServer.java:960) ~[spigot-1.16.5.jar:3029-Spigot-79d53c2-e9ad7cb]
    at net.minecraft.server.v1_16_R3.MinecraftServer.lambda$0(MinecraftServer.java:273) ~[spigot-1.16.5.jar:3029-Spigot-79d53c2-e9ad7cb]
    at java.lang.Thread.run(Unknown Source) [?:1.8.0_281]
    Caused by: java.lang.NullPointerException
    at to.epac.factorycraft.bossbarhealth.hpbar.HealthBar.updateEnemy(HealthBar.java:356) ~[?:?]
    at to.epac.factorycraft.bossbarhealth.handlers.DamageHandler.onDamage(DamageHandler.java:88) ~[?:?]
    at sun.reflect.GeneratedMethodAccessor221.invoke(Unknown Source) ~[?:?]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_281]
    at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_281]
    at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:315) ~[spigot-1.16.5.jar:3029-Spigot-79d53c2-e9ad7cb]
    ... 30 more
     
  10. I'll look into it
    May you provide more information like what situation triggered this?
     
  11. It just happened when players take damage from other players, whether it be with hand, weapon, skills from other plugin (RPG)

    For the mobs, there is no error

    i dunno what more information i could give you ^^'

    my config if you want:

    BossBarHealth:
    # Decimal places of all numbers including current hp, max hp, hp lost/gained
    Decimal: 0

    Self:
    # If it is enabled, it will show your hp at all times
    Enabled: true
    # Color of the boss bar
    # Avaliable options: BLUE, GREEN, PINK, PURPLE, RED, WHITE, YELLOW
    # https://hub.spigotmc.org/javadocs/spigot/org/bukkit/boss/BarColor.html
    Color: RED
    # Style of the boss bar
    # Avaliable options: SEGMENTED_10, SEGMENTED_12, SEGMENTED_20, SEGMENTED_6, SOLID
    # https://hub.spigotmc.org/javadocs/spigot/org/bukkit/boss/BarStyle.html
    Style: SOLID
    # Scale of the boss bar health display
    # If the option is 2.0, it shows 40/40 when you have full health
    Scale: 1.0
    Format:
    # Display format of normal part of boss bar health, the one which shows constantly
    # Placeholders:
    # %name% Player's name
    # %displayname% Player's display name
    # %hp%: Player's health
    # %max%: Player's maximum health
    # %hp_percent%: Player's health in %
    # %max_percent%: Player's maximum health in %
    # %hp_int% Player's health in integer
    # %max_int%: Player's maximum health in integer
    # Player's direction:
    # %direction_cardinalfull% North, East, South, West
    # %direction_cardinal% N, E, S, W
    # %direction_ordinalfull% NorthEast, SouthEast, etc...
    # %direction_ordinal% NE, SE, etc...
    # %direction_number% 0-359 degrees
    Normal: '&c%hp% &7/ &c%max%'
    # Display format of boss bar health when self HP changes
    # Placeholders:
    # %change% Player's health gained/lost
    # %change_percent%: Player's health lost/gained in %
    HpLost: '&c%hp% &7/ &c%max% &7(&c-%change%&7)'
    HpGain: '&c%hp% &7/ &c%max% &7(&a+%change%&7)'
    # Duration of lost/gained hp staying on screen, in ticks
    Duration:
    Normal: 60
    Zero: 20
    # How frequent will the boss bar change when facing has changed
    # Only effective when you have direction placeholders in the display format string
    Facing:
    Refresh: 1

    Enemy:
    # If it is enabled, it will show enemy's hp when you attack
    Enabled: true
    Color: RED
    Style: SOLID
    Scale: 1.0
    # If it is enabled, enemy's boss bar will override self boss bar when active
    Override: false
    Format:
    # Placeholders:
    # ** All Self's placeholders can be applied except %change% and %change_percent% **
    #
    # %e_type% Entity type of the enemy
    # %e_name% Name of the enemy
    # %e_displayname% Custom display name of the enemy, empty if null
    # %e_hp% Enemy's health
    # %e_max% Enemy's maximum health
    # %e_hp_percent% Enemy's health in %
    # %e_max_percent% Enemy's maximum health in %
    # %e_hp_int% Enemy's health in integer
    # %e_max_int% Enemy's maximum health in integer
    # %e_change%: Enemy's health lost/gained
    # Enemy's direction:
    # %e_direction_cardinalfull% North, East, South, West
    # %e_direction_cardinal N, E, S, W
    # %e_direction_ordinalfull% NorthEast, SouthEast, etc...
    # %e_direction_ordinal% NE, SE, etc...
    # %e_direction_number% 0-359 degrees

    HpLost: '%e_name% &c%e_hp%&4❤ &7(&c-%e_change%&7)'
    HpGain: '%e_name% &c%e_hp%&4❤ &7(&a+%e_change%&7)'
    # Duration of enemy's boss bar staying on screen, in ticks
    Duration:
    Normal: 200
    Zero: 60
    # How frequent will the boss bar change when enemy's facing has changed
    Facing:
    Refresh: 1

    # Entity type in the list will not have enemy's hp bar shown for players
    # Blacklist:
    # - COW
    # - CHICKEN
    # - PIG
    Blacklist: [ ]

    # How will the boss bar for player himself shows when takes specified type of damage
    DamageCause:
    # If the damage taken is not specified below
    Default:
    Color: RED
    Style: SOLID
    # If player takes fall damage
    # Available options:
    # https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/EntityDamageEvent.DamageCause.html
    FALL:
    Color: WHITE
    Style: SOLID

    # Settings of other plugins that was supported by BossBarHealth
    Hooks:
    # Hook of Citizens, use Citizens' method to get enemy NPC's name
    Citizens:
    Enabled: true
    # Hook of WorldGuard, update boss bar's color and style when entering region
    WorldGuard:
    # If it is enabled, the boss bar will change when you enter/leave regions specified below
    Enabled: true
    Regions:
    # Name of the region, if player is in multiple region, the plugin takes upper one in config
    # For example, I have "shop" on top of "spawn", the plugin takes "spawn" because it is placed
    # higher than "shop"
    'spawn':
    Color: BLUE
    Style: SOLID
    # 'shop':
    # Color: PURPLE
    # Style: SEGMENTED_6​
     
  12. The error you've mentioned has been fixed. Please check the latest version. Also, I have added few permissions for the commands.