HealthName [v0.4] for Sponge 7 - HealthBar

HealthName

Description

This plugins display the health of players or mobs above their head.

Links

Github - Source Code
Download
Please leave star on Github or a like/comment on this thread. Feel free to clone, fork or contribute to this repository.

Features

  • Works without client modifications
  • You can customize the character which will be displayed in the healthbar
  • Works with mobs and players

Config

# Show health bar above mobs
enabledMob=true
# Show the health of a player besides his nametag
nametagHealth=true
# Show the health of a player under his nametag (only the health number)
belowNameHealth=false
# What character should be used to display the health
displayChar='|'

Screenshots

Mob health

Sheep with healthbar

Player health with nametag and belowName options enabled

Player healthbar

2 Likes

Does this work when the mob already has a custom nametag?

Sadly, the plugin will override the old the nametag. Maybe itā€™s possible to append health indicators to the existing nametag. Iā€™ll try to look into it.

Which mod or plugin do you use which changes the nametag? If I find a ways to fix this issue, I want to make sure that the other plugin/mod still works.

The vanilla name tag item.

Oh right :slightly_smiling:

Nice plugin, but ā€¦ Where is the download link?

Ohh right ā€¦ Itā€™s fixed now.

Github - Source Code
Download

Version
forge-1.8-11.14.4.1577
spongeforge-1.8-1577-3.1.0-BETA-1024

[20:17:17] [Server thread/INFO] [healthname]: Loading HealthName v0.2
[20:17:17] [Server thread/ERROR] [Sponge]: Could not pass FMLPreInitializationEvent to Plugin{id=healthname, name=HealthName, version=0.2}
java.lang.NullPointerException
        at ninja.leaping.configurate.objectmapping.ObjectMapper$FieldData.serializeTo(ObjectMapper.java:105) ~[ObjectMapper$FieldData.class:1.8-1577-3.1.0-BETA-1024]
        at ninja.leaping.configurate.objectmapping.ObjectMapper$FieldData.deserializeFrom(ObjectMapper.java:87) ~[ObjectMapper$FieldData.class:1.8-1577-3.1.0-BETA-1024]
        at ninja.leaping.configurate.objectmapping.ObjectMapper$BoundInstance.populate(ObjectMapper.java:140) ~[ObjectMapper$BoundInstance.class:1.8-1577-3.1.0-BETA-1024]
        at com.github.games647.healthname.config.Settings.load(Settings.java:55) ~[Settings.class:?]
        at com.github.games647.healthname.HealthName.onPreInit(HealthName.java:60) ~[HealthName.class:?]
        at org.spongepowered.common.event.listener.GamePreInitializationEventListener_HealthName_onPreInit4.handle(Unknown Source) ~[?:?]
        at org.spongepowered.common.event.RegisteredListener.handle(RegisteredListener.java:86) ~[RegisteredListener.class:1.8-1577-3.1.0-BETA-1024]
        at org.spongepowered.mod.event.SpongeModEventManager.post(SpongeModEventManager.java:233) [SpongeModEventManager.class:1.8-1577-3.1.0-BETA-1024]
        at org.spongepowered.mod.event.SpongeModEventManager.post(SpongeModEventManager.java:277) [SpongeModEventManager.class:1.8-1577-3.1.0-BETA-1024]
        at org.spongepowered.mod.SpongeMod.onStateEvent(SpongeMod.java:167) [SpongeMod.class:1.8-1577-3.1.0-BETA-1024]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_66]
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_66]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_66]
        at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_66]
        at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) [minecraft_server.1.8.jar:?]
        at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) [minecraft_server.1.8.jar:?]
        at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) [minecraft_server.1.8.jar:?]
        at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) [minecraft_server.1.8.jar:?]
        at com.google.common.eventbus.EventBus.post(EventBus.java:275) [minecraft_server.1.8.jar:?]
        at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:212) [LoadController.class:?]
        at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:190) [LoadController.class:?]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_66]
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_66]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_66]
        at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_66]
        at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) [minecraft_server.1.8.jar:?]
        at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) [minecraft_server.1.8.jar:?]
        at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) [minecraft_server.1.8.jar:?]
        at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) [minecraft_server.1.8.jar:?]
        at com.google.common.eventbus.EventBus.post(EventBus.java:275) [minecraft_server.1.8.jar:?]
        at net.minecraftforge.fml.common.LoadController.onPost(LoadController.java:53) [LoadController.class:?]
        at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:119) [LoadController.class:?]
        at net.minecraftforge.fml.common.Loader.preinitializeMods(Loader.java:550) [Loader.class:?]
        at net.minecraftforge.fml.server.FMLServerHandler.beginServerLoading(FMLServerHandler.java:88) [FMLServerHandler.class:?]
        at net.minecraftforge.fml.common.FMLCommonHandler.onServerStart(FMLCommonHandler.java:355) [FMLCommonHandler.class:?]
        at net.minecraft.server.dedicated.DedicatedServer.func_71197_b(DedicatedServer.java:117) [po.class:?]
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:438) [MinecraftServer.class:?]
        at java.lang.Thread.run(Unknown Source) [?:1.8.0_66]

Nice to see more plugins making use of scoreboards :slight_smile:

2 Likes

@Aaron1011 the fanboying is real.

2 Likes

Thank you for the report. Itā€™s fixed now.

Not working. http://pastebin.com/8LHreJcT

forge-1.8.9-11.15.1.1890-1.8.9-universal.jar
spongeforge-1.8.9-1890-4.2.0-BETA-1625.jar
HealthName v0.2.2

This plugin has not been updated past SpongeAPI 3 so it wonā€™t work on newer versions of Sponge.

Know. It is a reminder to the developer.

There wasnā€™t any breaking changes in the meanwhile[quote=ā€œziceptor, post:12, topic:10613, full:trueā€]
Not working. [02:35:55] [ERROR] [Sponge]: Could not pass FMLServerStartedEvent to org.spongep - Pastebin.com

forge-1.8.9-11.15.1.1890-1.8.9-universal.jarspongeforge-1.8.9-1890-4.2.0-BETA-1625.jarHealthName v0.2.2
[/quote]

Thanks for the report. Itā€™s actually a bug. I uploaded a new version

BTW: I use :heart: and ā–ˆ as color chars

1 Like

Iā€™ll have a look

I didnā€™t realise that this plugin didnā€™t break, never mind me then lol.

Mobs all good! But if you hit the player, then

Is there another error on startup?

Yes