MobHealth
Mob Health
This simple but invaluable plugin lets you know the damage you just caused to a mob (including other players), and how much health it has left.
Now with ActionBars!
If you have 1.8 bukkit/spigot then you can now enable actionbars by adding useActionBar: true to your config (or set to false to disable).
-
Mob Health has a range of useful options including:
- Control over how messages are shown
- When messages are shown
- When messages are *not* shown (a useful feature!)
- Exactly what is displayed - including your own custom messages...
Current Release Version: 9.1.0
Updater Information
Note that unless you edit MobHealth configuration it will automatically update as new versions are approved by the Bukkit team.
You can edit config.yml
in the /plugins/MobHealth/
folder you can find the following settings.
updateCheck true
- Show notification of available updates.
doUpdate true
- Update MobHealth automatically when new download is available.
Change doUpdate to false to stop any file download, and updateCheck to false to stop notices about new versions in your startup log.
Got API?
MobHealth now has 100% more API included!
You can trigger damage notifications, if your plugin adds skills or spells for example. And far more usefully - you can query MobHealth to get the current health and max health of any Mob, regardless of which plugin is responsible for tracking it.
Think of it as Vault for mob health levels ;) You code for one plugin - I sort out the mess behind the scenes.
See the API page for more info.
NEW healthbars!!
As frequently requested, MobHealth can now display health bars above Mobs, and a health counter for players.
PLEASE NOTE: If enabled - these bars show above ALL players / mobs, regardless of any toggle or permissions settings.
Enable this feature with the following flags in config:
showPlayerHeadHealth: true
Enables health counter display below player names.
usePercentForPlayer: true
Changes health counter from HP to a percentage of health left (recommended).
showMobHeadHealth: true
Enable health bars for all mobs.
useBarForMobs: true
If true, use a health bar in format of [||||||||||] if false, show in format of "10/20"
Compatible Plugins
EpicBossRecoded
You shouted for it - here it is, Epic Boss support.
Thanks to ThaH3lper for adding in an entire API for MobHealth.
Spout
If Spout-plugin is installed and the client uses SpoutCraft (and disableSpout is on its default false setting) then notification will be shown with the achievement notification (as seen above).
ZombieMod
Exclusive to Imagicraft's Zombie Apocalypse RP (Zarp) server, ZombieMod creates several variaties of Zombie to terrorise players trying to survive in this post-apocalyptic server.
SimpleNotice
MobHealth now supports the Client Mod simple notice. Lets you show the messages elsewhere so your chat is spam free.
Thanks to FeildMaster for the pull request :)
Heroes
Heroes health and levelled up HP's are reported correctly as are mobs whose health levels have been adjusted in the config. Use of a Heroes skill will trigger a notification when it damages.
Mobs
Mobs adjustments to health are now tracked and reported in MobHealth.
Thanks to coldandtired for adding in MaxHealth and an API for me :)
Mob Arena
Bosses in a currently running Mob Arena report correct health and max-health. As do waves with a modified reduced health.
Thanks to garbagemule for adding MaxHealth to mob area for me.
LikeABoss/Corruption
MobHealth detects wandering bosses and correctly reports their health and name.
Thanks to bm01 and Erackron for integration help.
Monster Apocalypse (6.0b+)
If Monster Apocalypse is set to handle mob's health then these values are used for MobHealth.
Thanks to blainicus for answering my queries.
Video
See MobHealth in action here...
Thanks to WoopaGaming for the video.
Commands
/MobHealth reload
Reloads current configuration.
/MobHealth toggle [player]
Toggle notifications. [player] is ignored via chat and mandatory via the console.
Configuration
See the configuration page for full details.
Permissions
See the permissions page for full details.
Source Code
https:github.com/Sablednah/MobHealth
Stats Collection
Like many bukkit plugins, Mobhealth 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
- The number of damage notices displayed (but not their content)
Opting out of this service can be done by editing plugins/Plugin Metrics/config.yml and changing opt-out to true.
Changelog
9.0.0: New ActionBar notifications.
8.3.0: Adds Rabbit, Endermite and Guardian mobs
8.2.2: Added fallback code for potential missing new methods.
8.2.1: Rollback gettextresource to get resources
8.2.0: Filter rogue &f colour code prefix's. Add scoreboard event (so it can be cancelled to preserve scoreboards).
8.0.1: Cleanup - removed unused class, update metrics to V7
8.0.0: Reworked Heroes integration. 1.7.2 compatibility fixes.
Download
Github no longer allows a "downloads" section, so I no longer mirror files there. If you'd like to test beta/dev versions follow me on twitter and ask there! But understand such files would not yet be approved by BukkitDev staff.
Known Bugs/Conflicts
- Plugins that alter mobs health levels usually return false health levels.
The plugins listed above are supported.
Donations
Donations of any amount are, of course appreciated :)
Contributions go towards maintaining my development server to encourage continued development, MobHealth is solo coded by me, and supporting so many other plugin takes a fair bit of time. So if you think that time is worth something then Hit the dontae button in the top right of this page :)
This plugin lags the poop out of my server . Might be because I have a lot of custom made bosses not sure. 10 tps loss.
@PatoTheBest
For now horse health bars are completely disabled in 7.0.1/7.0.2 as they just don't play well with inventories, and theres no clean way to strip the bar when E is pressed.
If your horses already have health bars from 7.0.0 then just right click with an empty hand, or hit them (try a snowball for 0 damage) to trigger a cleaning function to strip the bar.
If you want health bars disabled completely (which should be the default config) then be aware that if you have had them enabled - they will hang around. Switching to and from healthbars will leave ghost bars behind which i'll try to get a clean up routine in place for the non-dev release of MH7
@NoHoPeLess
I finally got there ! ;)
@CollinDesigns
Yeah - thats an ongoing thing - seas to be more the scoreboards code than plugins - still looking for improvements tho.
Can't open horses inventory. Health bar shows even if on the config is disabled.
@SableDnah
THX man! The Bugception :D works great!
@SableDnah
Euhhmm well the 0 health display only above certain players. I use tagapi its prob due this I assume.
@CollinDesigns
I think you might need to edit custom messages for the snowball and egg events.. can you open a ticket - and pastie me contents of your config.yml and lang.yml files?
In the config its saying: hideNoDammage: false Hide notifications that inflict 0 damage. Custom Egg and Snowball notifications are exempt.
But I have this set to true yet it still display the 0 health inflict....
@NoHoPeLess
Drop me a DM on Twitter - I have 7.0.2 ready to test.
@SableDnah
I install it from the twitter link... result:
@KelvinKam
@NoHoPeLess
@der_Kernschatten
Check my Twitter...
Well, I guess I won't be reporting the 'spam' since others have. Thanks for the update, SableDnah, telling us that this will be fixed.
It spams my Console so massivly!!!
And:
WUSH!!
When I hit the horse 2013-07-27 03:38:56 [WARNING] [MobHealth] Task #8446 for MobHealth v7.0.0 generated an exception java.lang.NullPointerException at me.sablednah.MobHealth.MobHealth.cleanName(MobHealth.java:634) at me.sablednah.MobHealth.ServerDamageEntityListener$ScheduledshowBar.run(ServerDamageEntityListener.java:207) at org.bukkit.craftbukkit.v1_6_R2.scheduler.CraftTask.run(CraftTask.java:53) at org.bukkit.craftbukkit.v1_6_R2.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:345) at net.minecraft.server.v1_6_R2.MinecraftServer.t(MinecraftServer.java:522) at net.minecraft.server.v1_6_R2.DedicatedServer.t(DedicatedServer.java:226) at net.minecraft.server.v1_6_R2.MinecraftServer.s(MinecraftServer.java:486) at net.minecraft.server.v1_6_R2.MinecraftServer.run(MinecraftServer.java:419) at net.minecraft.server.v1_6_R2.ThreadServerApplication.run(SourceFile:582) 2013-07-27 03:40:18 [SEVERE] Could not pass event EntityDamageByEntityEvent to MobHealth v7.0.0 org.bukkit.event.EventException at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:427) at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:477) at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:462) at org.bukkit.craftbukkit.v1_6_R2.event.CraftEventFactory.callEvent(CraftEventFactory.java:95) at org.bukkit.craftbukkit.v1_6_R2.event.CraftEventFactory.callEntityDamageEvent(CraftEventFactory.java:383) at org.bukkit.craftbukkit.v1_6_R2.event.CraftEventFactory.handleEntityDamageEvent(CraftEventFactory.java:408) at net.minecraft.server.v1_6_R2.EntityLiving.damageEntity(EntityLiving.java:636) at net.minecraft.server.v1_6_R2.EntityAnimal.damageEntity(SourceFile:128) at net.minecraft.server.v1_6_R2.EntityHorse.damageEntity(EntityHorse.java:251) at net.minecraft.server.v1_6_R2.EntityHuman.attack(EntityHuman.java:884) at net.minecraft.server.v1_6_R2.PlayerConnection.a(PlayerConnection.java:1121) at net.minecraft.server.v1_6_R2.Packet7UseEntity.handle(SourceFile:36) at net.minecraft.server.v1_6_R2.NetworkManager.b(NetworkManager.java:296) at net.minecraft.server.v1_6_R2.PlayerConnection.e(PlayerConnection.java:116) at net.minecraft.server.v1_6_R2.ServerConnection.b(SourceFile:37) at net.minecraft.server.v1_6_R2.DedicatedServerConnection.b(SourceFile:30) at net.minecraft.server.v1_6_R2.MinecraftServer.t(MinecraftServer.java:590) at net.minecraft.server.v1_6_R2.DedicatedServer.t(DedicatedServer.java:226) at net.minecraft.server.v1_6_R2.MinecraftServer.s(MinecraftServer.java:486) at net.minecraft.server.v1_6_R2.MinecraftServer.run(MinecraftServer.java:419) at net.minecraft.server.v1_6_R2.ThreadServerApplication.run(SourceFile:582) Caused by: java.lang.NullPointerException at me.sablednah.MobHealth.MobHealth.cleanName(MobHealth.java:634) at me.sablednah.MobHealth.ServerDamageEntityListener.onEntityDamage(ServerDamageEntityListener.java:94) at sun.reflect.GeneratedMethodAccessor58.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:425) ... 21 more 2013-07-27 03:40:18 [WARNING] [MobHealth] Task #8655 for MobHealth v7.0.0 generated an exception java.lang.NullPointerException at me.sablednah.MobHealth.MobHealth.cleanName(MobHealth.java:634) at me.sablednah.MobHealth.ServerDamageEntityListener$ScheduledshowBar.run(ServerDamageEntityListener.java:207) at org.bukkit.craftbukkit.v1_6_R2.scheduler.CraftTask.run(CraftTask.java:53) at org.bukkit.craftbukkit.v1_6_R2.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:345) at net.minecraft.server.v1_6_R2.MinecraftServer.t(MinecraftServer.java:522) at net.minecraft.server.v1_6_R2.DedicatedServer.t(DedicatedServer.java:226) at net.minecraft.server.v1_6_R2.MinecraftServer.s(MinecraftServer.java:486) at net.minecraft.server.v1_6_R2.MinecraftServer.run(MinecraftServer.java:419) at net.minecraft.server.v1_6_R2.ThreadServerApplication.run(SourceFile:582)
@Rogasmo
Yeah thats the cleaning function failing for entities without custom names. 7.0.1 dev will be available soon to stop that notice spamming the console.
@zekigames
Actually if you read the comments you'd see that's fixed in 7.0.0, the "E" bug is due to the client refusing gui names > 32 length.. but the api allows names over 32 to be set.
11:09:27 PM [warning] [MobHealth] Task #2004 for MobHealth v7.0.0 generated an exception 11:09:27 PM [javastacktrace] java.lang.NullPointerException 11:09:27 PM [javastacktrace] at me.sablednah.MobHealth.MobHealth.cleanName(MobHealth.java:634) 11:09:27 PM [javastacktrace] at me.sablednah.MobHealth.ServerDamageEntityListener$ScheduledshowBar.run(ServerDamageEntityListener.java:207) 11:09:27 PM [javastacktrace] at org.bukkit.craftbukkit.v1_6_R2.scheduler.CraftTask.run(CraftTask.java:53) 11:09:27 PM [javastacktrace] at org.bukkit.craftbukkit.v1_6_R2.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:345) 11:09:27 PM [javastacktrace] at net.minecraft.server.v1_6_R2.MinecraftServer.t(MinecraftServer.java:522) 11:09:27 PM [javastacktrace] at net.minecraft.server.v1_6_R2.DedicatedServer.t(DedicatedServer.java:226) 11:09:27 PM [javastacktrace] at net.minecraft.server.v1_6_R2.MinecraftServer.s(MinecraftServer.java:486) 11:09:27 PM [javastacktrace] at net.minecraft.server.v1_6_R2.MinecraftServer.run(MinecraftServer.java:419) 11:09:27 PM [javastacktrace] at net.minecraft.server.v1_6_R2.ThreadServerApplication.run(SourceFile:582)>>
"attention"
Do not download it brings a big mistake ... when riding a horse and press the letter "E" closes the server..
Oh, I redownloaded and it's ok now. Thanks!