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 :)
@Kane_Hart cleanDeathMessages removes the health info from the mob name in death messages.
so you get Bob killed zombie, not Bob killed zombie [||||| ] or Bob killed zombie 0/20
@Sanyikahh
Ahh, looks like there is a bug with the update code in 1.5.2 version. Let me know which version your trying to use - and i'll see if can can post a fix up for you.
Help me i cant use this plugin! This plugin always update! I switch it off but update again , and again but i dint need update , i use minecraft 1.5.2 version and it dont works with the newest version ! Please help how i switch it off?
What does cleanDeathMessages do?
Why you not add new feature like Boss Health Bar player and mob ?
Is it possible to use \n and such to have for example mobname \n health? Also it would be nice if you could introduce some placeholders for healthbars (overhead) which use special ascii symbols like: █ or ❤ , ♡, ♥
EDIT: Could you also add a option to disable those (+x) messages? They display wrong values not fitting with heroes or other plugins calculating damage..., should also work if you increase eventhandlers priority but a option would be nice though :)
EDIT 2: I get my console spammed with some dbug messages including 'entities +"unknown."' and CraftPlayer...
@SableDnah
It may not be forceBarHide, but it shows up like it is to me:
forceBarHide:
- EnderDragon
- Wither
- Horse
- Horse
That is today after deleting it yesterday. It seems to add another - Horse every restart. If it's something being worked, I'll just leave it.
@der_Kernschatten
You mean in the config file? That's not the forceBarHide - that's just the automatic override to fix horses. As long names break the gui with a client side crash. It should only have one - and its being worked on - feel free to delete the extra lines.
Is there a reason I'm not aware of that "forceBarHide" fills up with a continuously growing list with " - Horse" repeated over and over?
@pl4y4k1ll3r
Yeah, scroll down and try the dev version i linked bellow
Does this work with epicboss gold edition aswel ?
@TheKnight787 The Item or the Plugin? Also define "doesn't work"...
Doesn't work with NameTags
@shaythegoon
Can you try my dev version I just rolled out and let me know if it works for you?
http://www.sabletopia.co.uk:8080/job/MobHealth/13/MobHealth$MobHealth/artifact/MobHealth/MobHealth/7.1.3-DEV/MobHealth-7.1.3-DEV.jar
@SableDnah
Checking the code I think I already added this - try adding alwaysVisable: true in the config.
Sorry for the slow releases/fixes everyboddy. Had some personal stuff, but back coding now. Will push dev releases to my Jenkins and a release out soon.
@shaythegoon
Thanks for the report - looking into it now.
@hutt132
Yes there is, and it used to do that bit I "fixed" it. I'll add it back in for the next release.
This plugin is breaking with Mobs and Spawns (coldandtired). Hoping that you can get these fixed cause the errors are breaking my server and I really enjoy this plugin being used.
[WARNING] [MobHealth] Task #4396060 for MobHealth v7.1.0 generated an exception java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 at java.util.ArrayList.rangeCheck(Unknown Source) at java.util.ArrayList.get(Unknown Source) at java.util.Collections$UnmodifiableList.get(Unknown Source) at me.sablednah.MobHealth.API.MobHealthAPI.getMobMaxHealth(MobHealthAPI.java:336) at me.sablednah.MobHealth.SetHealth.setPlayer(SetHealth.java:60) at me.sablednah.MobHealth.API.MobHealthAPI.showBar(MobHealthAPI.java:458) at me.sablednah.MobHealth.ServerDamageEntityListener$ScheduledshowBar.run(ServerDamageEntityListener.java:217) at org.bukkit.craftbukkit.v1_6_R3.scheduler.CraftTask.run(CraftTask.java:53) at org.bukkit.craftbukkit.v1_6_R3.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:345) at net.minecraft.server.v1_6_R3.MinecraftServer.t(MinecraftServer.java:524) at net.minecraft.server.v1_6_R3.DedicatedServer.t(DedicatedServer.java:227) at net.minecraft.server.v1_6_R3.MinecraftServer.s(MinecraftServer.java:488) at net.minecraft.server.v1_6_R3.MinecraftServer.run(MinecraftServer.java:421) at net.minecraft.server.v1_6_R3.ThreadServerApplication.run(SourceFile:583) 2013-11-05 21:40:51 [INFO] shaythegoon101 issued server command: /difficulty 0 2013-11-05 21:40:51 [INFO] shaythegoon101: Set difficulty to PEACEFUL[m 2013-11-05 21:40:52 [WARNING] [MobHealth] Task #4396094 for MobHealth v7.1.0 generated an exception java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 at java.util.ArrayList.rangeCheck(Unknown Source) at java.util.ArrayList.get(Unknown Source) at java.util.Collections$UnmodifiableList.get(Unknown Source) at me.sablednah.MobHealth.API.MobHealthAPI.getMobMaxHealth(MobHealthAPI.java:336) at me.sablednah.MobHealth.SetHealth.setPlayer(SetHealth.java:60) at me.sablednah.MobHealth.API.MobHealthAPI.showBar(MobHealthAPI.java:458) at me.sablednah.MobHealth.ServerDamageEntityListener$ScheduledshowBar.run(ServerDamageEntityListener.java:217) at org.bukkit.craftbukkit.v1_6_R3.scheduler.CraftTask.run(CraftTask.java:53) at org.bukkit.craftbukkit.v1_6_R3.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:345) at net.minecraft.server.v1_6_R3.MinecraftServer.t(MinecraftServer.java:524) at net.minecraft.server.v1_6_R3.DedicatedServer.t(DedicatedServer.java:227) at net.minecraft.server.v1_6_R3.MinecraftServer.s(MinecraftServer.java:488) at net.minecraft.server.v1_6_R3.MinecraftServer.run(MinecraftServer.java:421) at net.minecraft.server.v1_6_R3.ThreadServerApplication.run(SourceFile:583) 2013-11-05 21:40:52 [WARNING] [MobHealth] Task #4396118 for MobHealth v7.1.0 generated an exception java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 at java.util.ArrayList.rangeCheck(Unknown Source) at java.util.ArrayList.get(Unknown Source) at java.util.Collections$UnmodifiableList.get(Unknown Source) at me.sablednah.MobHealth.API.MobHealthAPI.getMobMaxHealth(MobHealthAPI.java:336) at me.sablednah.MobHealth.SetHealth.setPlayer(SetHealth.java:60) at me.sablednah.MobHealth.API.MobHealthAPI.showBar(MobHealthAPI.java:458) at me.sablednah.MobHealth.ServerDamageEntityListener$ScheduledshowBar.run(ServerDamageEntityListener.java:217) at org.bukkit.craftbukkit.v1_6_R3.scheduler.CraftTask.run(CraftTask.java:53) at org.bukkit.craftbukkit.v1_6_R3.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:345) at net.minecraft.server.v1_6_R3.MinecraftServer.t(MinecraftServer.java:524) at net.minecraft.server.v1_6_R3.DedicatedServer.t(DedicatedServer.java:227) at net.minecraft.server.v1_6_R3.MinecraftServer.s(MinecraftServer.java:488) at net.minecraft.server.v1_6_R3.MinecraftServer.run(MinecraftServer.java:421) at net.minecraft.server.v1_6_R3.ThreadServerApplication.run(SourceFile:583) 2013-11-05 21:40:53 [WARNING] [MobHealth] Task #4396123 for MobHealth v7.1.0 generated an exception java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 at java.util.ArrayList.rangeCheck(Unknown Source) at java.util.ArrayList.get(Unknown Source) at java.util.Collections$UnmodifiableList.get(Unknown Source) at me.sablednah.MobHealth.API.MobHealthAPI.getMobMaxHealth(MobHealthAPI.java:336) at me.sablednah.MobHealth.SetHealth.setPlayer(SetHealth.java:60) at me.sablednah.MobHealth.API.MobHealthAPI.showBar(MobHealthAPI.java:458) at me.sablednah.MobHealth.ServerDamageEntityListener$ScheduledshowBar.run(ServerDamageEntityListener.java:217) at org.bukkit.craftbukkit.v1_6_R3.scheduler.CraftTask.run(CraftTask.java:53) at org.bukkit.craftbukkit.v1_6_R3.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:345) at net.minecraft.server.v1_6_R3.MinecraftServer.t(MinecraftServer.java:524) at net.minecraft.server.v1_6_R3.DedicatedServer.t(DedicatedServer.java:227) at net.minecraft.server.v1_6_R3.MinecraftServer.s(MinecraftServer.java:488) at net.minecraft.server.v1_6_R3.MinecraftServer.run(MinecraftServer.java:421) at net.minecraft.server.v1_6_R3.ThreadServerApplication.run(SourceFile:583) 2013-11-05 21:40:54 [WARNING] [MobHealth] Task #4396130 for MobHealth v7.1.0 generated an exception java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 at java.util.ArrayList.rangeCheck(Unknown Source) at java.util.ArrayList.get(Unknown Source) at java.util.Collections$UnmodifiableList.get(Unknown Source) at me.sablednah.MobHealth.API.MobHealthAPI.getMobMaxHealth(MobHealthAPI.java:336) at me.sablednah.MobHealth.SetHealth.setPlayer(SetHealth.java:60) at me.sablednah.MobHealth.API.MobHealthAPI.showBar(MobHealthAPI.java:458) at me.sablednah.MobHealth.ServerDamageEntityListener$ScheduledshowBar.run(ServerDamageEntityListener.java:217) at org.bukkit.craftbukkit.v1_6_R3.scheduler.CraftTask.run(CraftTask.java:53) at org.bukkit.craftbukkit.v1_6_R3.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:345) at net.minecraft.server.v1_6_R3.MinecraftServer.t(MinecraftServer.java:524) at net.minecraft.server.v1_6_R3.DedicatedServer.t(DedicatedServer.java:227) at net.minecraft.server.v1_6_R3.MinecraftServer.s(MinecraftServer.java:488) at net.minecraft.server.v1_6_R3.MinecraftServer.run(MinecraftServer.java:421) at net.minecraft.server.v1_6_R3.ThreadServerApplication.run(SourceFile:583)
I'm not sure if this is much help to you at the moment...
Shaythegoon
Is there a way for it have the mob health stay above their head instead of only showing up when you look at it?