

BodyHealth - Health Management Per Body Part!
BodyHealth introduces a new way to handle player health
by managing damage and healing per body part.
Built for compatibility, it works well with plugins like
Realistic Survival, MythicMobs, ProjectKorra
and their custom damage sources
Demo Server:
showcase.breweryteam.dev

Fine-Tuned Damage
Customize how different damage types
(fall, fire, drowning, etc.) affect specific body parts
In-Game Display
Integrates with PlaceholderAPI and BetterHud
for real-time body part health displays
Incorporates all factors
Fully supports armor, enchantments, potion effects,
and even attributes when calculating damage
Custom Effects
Script your own effects and specify exactly what
should happen under what circumstances
Raytracing
Uses raytracing for precision in determining which
body part is hit. For damage that isn't caused by entities,
vector calculations are used instead
Comprehensive config
You may even set different max health per body part
and have it depend on the players vanilla max health
Check it out here, the possibilities are endless!
API
Directly hook into BodyHealth with your own
plugin to further expand its functionality
(usage guide can be found here)
Addon System
Supports addons like this one that
directly integrate with BodyHealth
without 3rd party plugins
Plugin Hooks
Hooks into plugins like WorldGuard to
further enhance your experience using it
Performance
Safe to say this won't be the
plugin lagging your server

Official LocationalArmorAddon SkriptAddon
Community RealisticBodyHealthAddon
Have an addon to share? Contact me to have it listed here

/bodyhealth reload
reloads the plugins configuration, including effects and language files
/bodyhealth heal [player] [body part]
heal a player (sets the health value of all affected body parts to 100%)
/bodyhealth get [player] [body part]
retrieve a player's health (in percent) for a specific body part, or all
/bodyhealth set [player] [body part]
set a player's health for a specific body part (or all if not specified)
/bodyhealth add [player] [body part]
add health to all parts or the given one for a given player or yourself
/bodyhealth data <save/dump/erase/move> [...]
control BodyHealth's DataManager, managing data in all storage types
/bodyhealth debug <dump/toggle> [...]
dump debug information, or toggle debug- or development mode in game
/bodyhealth addon <info/list/reload/enable/disable/load/unload> [...]
manage BodyHealth addons while the server is running

bodyhealth.update-notify
notifications upon new updates
bodyhealth.reload
allows reloading the system
bodyhealth.heal
allows using the heal command
bodyhealth.get
allows using the get command
bodyhealth.set
allows using the set command
bodyhealth.add
allows using the add command
bodyhealth.data
allows using the data command
bodyhealth.debug
allows using the debug command
bodyhealth.addon
allows using the addon command

BodyHealth works seamlessly with PlaceholderAPI
for detailed health placeholders per body part
%bodyhealthhealth
(returns the current amount of health for a body part in percent)
%bodyhealthhealth
(same as the one above, just without decimal places)
%bodyhealthstate
(returns the current state of a body part)

Please have a look at our Setup Guide
Cant't update to 1.21 yet?
Check out BodyHealthLegacy

Ask questions, request new features or report bugs either
here or on our Discord server (click the icon below to join)
How to Install BodyHealth - Locational Health & Damage (Plugin)
BodyHealth - Locational Health & Damage by Mitality is verified for Folia, Paper, Purpur, Spigot across Minecraft versions 1.21, 1.21.1, 1.21.10, 1.21.11, 1.21.2, 1.21.3, 1.21.4, 1.21.5 (latest release: 4.2.0, file size: 3.9 MB). Follow the steps below to install it safely from ModCraft.tv:
- Click the Download button above and select your Minecraft version (1.21, 1.21.1, 1.21.10, 1.21.11, 1.21.2, 1.21.3, 1.21.4, 1.21.5) and platform (Folia, Paper, Purpur, Spigot).
- Make sure you have the compatible loader or environment installed for Folia, Paper, Purpur, Spigot.
- Move the downloaded BodyHealth - Locational Health & Damage file into your Minecraft
.minecraft/pluginsfolder and launch the game.
All Versions
+ Add Version| Name | Game version | Platforms | Published | Downloads | Actions |
|---|---|---|---|---|---|
| 2mo ago | 49 | ||||
| 2mo ago | 24 | ||||
| 2mo ago | 16 | ||||
| 2mo ago | 12 | ||||
| 2mo ago | 10 | ||||
| 2mo ago | 8 | ||||
| 2mo ago | 7 | ||||
| 2mo ago | 6 | ||||
| 2mo ago | 5 | ||||
| 2mo ago | 5 | ||||
| 2mo ago | 4 | ||||
| 2mo ago | 4 | ||||
| 2mo ago | 4 | ||||
| 2mo ago | 3 | ||||
| 2mo ago | 3 | ||||
| 2mo ago | 3 | ||||
| 2mo ago | 3 | ||||
| 2mo ago | 3 | ||||
| 2mo ago | 3 | ||||
| 2mo ago | 2 | ||||
| 2mo ago | 2 | ||||
| 2mo ago | 2 | ||||
| 2mo ago | 2 | ||||
| 2mo ago | 2 | ||||
| 2mo ago | 2 | ||||
| 2mo ago | 2 | ||||
| 2mo ago | 2 | ||||
| 2mo ago | 2 | ||||
| 2mo ago | 2 | ||||
| 2mo ago | 2 | ||||
| 2mo ago | 2 | ||||
| 2mo ago | 2 | ||||
| 2mo ago | 1 | ||||
| 2mo ago | 1 | ||||
| 2mo ago | 1 | ||||
| 2mo ago | 1 |
- Added**
use-transient-modifiers, a new config option that, when enabled, uses attribute modifiers that are discarded when your server shuts down, so they can never persist.
- Added**
ATTRIBUTE_MODIFIER, a new built-in effect for adding attribute modifiers to players.
- Added** more safety measures to ensure that attribute modifiers never stay, even when not transient.
- Added**
apply-potion-effects-repeatedly, a new config option that, when enabled, applies potion effects from thePOTION_EFFECTeffect repeatedly, like a beacon would, instead of using infinite-duration effects.
- Added** a system that reliably detects world changes on Folia-based server software to apply HUD visibility correctly.
- Added**
PREVENT_HOLD, a new effect that prevents players from holding items in a given hand.
- Added** many new settings related to health regeneration. You can now make part health regenerate separately from vanilla health, but in the same way, even draining hunger if that is what you want. Regenerating health in your sleep is now also supported.
- Added** new API methods for healing players with a precise amount and for checking whether a player is able to hold an item in a given hand.
- Added** a new subcommand,
/bodyhealth addon <info/list/reload/enable/disable/load/unload> [...]for managing addons while the server is running.
- Added** a new optional argument to the
SOUNDeffect that allows you to make the sound global, so all nearby players can hear your heartbeat or whatever you do with it.
- Added**
PARTICLE, a new effect that allows you to spawn particles, like red dust around your hand to make it look like it's bleeding.
- Added** a new wiki page that explains every effect in more detail: https://github.com/Mitality/BodyHealth/wiki/Effects
- Added**
CHANCE, a new effect that allows you to trigger effects based on chance. It also features an optional key argument that allows you to group multipleCHANCEeffects together, executing multiple effects based on the same chance/roll (either all effects in a group are run, or none).
- Added**
BODYHEALTH, a new effect that allows you to modify body health values for the affected player, or even for all online players, allowing you to sync everyone's body health.
- Improved** AddonManager to show a stacktrace when enabling an addon fails.
- Improved** accuracy of damaged-by-block calculations. BodyHealth now correctly determines whether both of your feet are touching a damaging block, or just one.
- Improved** the primary config file's formatting to be more aesthetically pleasing and easier to comprehend.
- Improved** debug messaging to only log important and non-verbose messages in non-verbose mode.
- Fixed** instructions for ItemsAdder users showing incorrect paths in
config.yml.
- Fixed** custom 3rd party effects not registering.
- Fixed** BetterHud sometimes being reloaded twice by BodyHealth.
- Fixed**
DELAYEDandREPEATINGeffects not working o
- Added** a
raytracing.fix-rotationconfig option to fix imprecise mob rotations that caused raytracing to fail sometimes
- Added** a
lenient-movement-restrictionsconfig option (disabled by default), that makes the PREVENT_WALK and PREVENT_JUMP effects allow some mobility instead of completely preventing movement
- Added** a
hide-potion-effectsconfig option that disables ambient, particles and the effect icon for effects applied by BodyHealth
- Added** defaults for poison damage to the body-damage config section
- Added** more debug information for bypassing damage and regeneration to resolve permission problems more easily
- Added**
heal-on-respawnandheal-on-full-healthas new config options, controlling body part regeneration
- Added** a
display.betterhud.enabled-onlyconfig option that only shows BodyHealth's HUD in worlds/regions where BodyHealth is enabled
- Fixed** BodyHealth not taking BetterHud's
build-folder-locationandpack-typeconfig options into account
- Fixed** disabling the
display.betterhud.as-defaultconfig option having no effect
- Fixed** a small formatting issue with debug messages
Official addons will be updated to work with this version right after this is released.
## BodyHealth v4.0.0
- Renamed** 'BODY' (body part) to 'TORSO'. Your config, language files, the selected storage, and BetterHud's configuration will automatically be migrated to reflect that change, but if you are using body parts anywhere externally, you need to migrate that manually
- Retextured** all HUD elements of the 'DAMAGED' state to match the quality standard imposed by the four other states
- Added** Folia support! BetterHud should already work on Folia as-is, for PlaceholderAPI, you will need to use a fork that supports Folia, until the main version does: https://github.com/Folia-Inquisitors/PlaceholderAPI-Folia/releases/tag/Tango<br>
- NOTE:** On Folia, it is not possible to reliably remove all effects from a player on shutdown, because the global thread is no longer available. Instead, we store all currently active effects per player and remove them the next time the player joins. On PaperMC and its forks, you can toggle this behavior with a new
remove-effects-on-shutdownsetting in config.yml
- Added** an optional 'enabled' property to permission overrides that allows you to disable them and disabled the default overrides
- Added** a data command ('/bh data save/dump/erase/move') that allows for asynchronous data management and easy storage type changes
- Added** HUD scaling! You can now scale BodyHealth's HUD with a new config option at
display.betterhud.position.scale(default is 1.5)
- Added** a debug command that allows toggling both debug modes, as well as dumping debug information that could be useful for diagnosing issues
- Added** a translated variant of the state placeholder ('%bodyhealth_state_<part>_translated%') outputs new translations that may contain other placeholders and formatting
- Improved** the default body-damage configuration to not apply the damage you take when dying to all of your body parts
- Improved** BodyHealth's UpdateChecker to show name and current version in "You are running the latest version" messages
- Improved** the default effect configuration further, aiming to showcase all effects while still making sense in a survival environment
- Improved** tips at the end of config.yml to include instructions on how to merge BetterHud's pack with ItemsAdder for those who need that
- Improved** Debug logging in AddonManager so you better understand what went wrong with an addon, if problems with one arise
- Fixed** default prefix missing a formatting-reset at the end
- Fixed** the UpdateChecker's first empty line not being shown in some consoles
- Fixed** BodyHealth's calculations not considering the change in head height caused by sneaking
- Fixed** some parts of the plugin still not using the by now no longer new, but still robust error logging logic
- Fixed** some effects not being listed as ongoing, despite them being active (didn't matter b
## BodyHealth v3.0.0
- New** official addon: [LocationalArmorAddon](https://modrinth.com/plugin/bodyhealthaddon-locationalarmoraddon) (BodyHealth v3.0.0+, Minecraft v1.21.3+)
- Added** a %BodyPart% placeholder to the COMMAND and COMMAND_UNDO effects that translates into the BodyPart that caused the effect, so you can copy/paste the effect onto different parts
- Added** a new update checker that checks for updates on Modrinth, works with dev versions and prereleases, and formats update notifications a bit nicer
- Added** a new config option that allows you to chose whether to check for development versions and prereleases, or full releases only
- Added** permission overrides to the body-health and body-damage configuration sections (examples are added to your config)
- Added** a %bodyhealth_enabled% PAPI placeholder that returns true when BodyHealth is enabled for a player
- Added** more robust error logging for throwables and error logging for failing math expressions
- Added** new meta effects (DELAYED & REPEATING) to execute effects delayed and/or repeating
- Improved** the default effect config to still use all effects there are, but while actually making sense in a survival environment, so it can now be used without changes (check it out [here](https://github.com/Mitality/BodyHealth/blob/a17a4cf3565c504287efb98f29ad681d46e66f39/src/main/resources/config.yml#L315-L399))
- Improved** MySQL and SQLite storage types to use HikariCP for extra performance and stability
- Improved** various methods to be thread safe when used by multiple plugins/addons at the same time
- Improved** debug logging to not only include the calling class, but now also the line of code
- Improved** various comments within the plugin's source code and its configuration file
- Improved** parsing of the body-damage section to warn users in case of invalid entries
- Improved** meta effects to allow you to chain them together
- Fixed** missing javadoc params in the BodyHealth and EffectHandler classes
- Fixed** en-us being set as the default language, despite the file being named en.yml
- Fixed** attribute modifiers being expected in one specific format, causing errors with other formats present
- Updated** the following wiki entries: [Setup Guide](https://github.com/Mitality/BodyHealth/wiki/Setup), [API Usage](https://github.com/Mitality/BodyHealth/wiki/API), [Addons](https://github.com/Mitality/BodyHealth/wiki/Addons)
## For Developers
### Events
- Added** causing/underlying event to BodyPartHealthChangeEvent (retrieve with BodyPartHealthChangeEvent#getCause, can optionally be set via API)
- Fixed** health value in BodyPartHealthChangeEvent#setNewHealth being set as an int instead of double
### Effects
- Added** methods that let you register your own BodyHealthEffects via the API or directly within an addon's main class ([docs](https://github.com/Mitality/BodyHealth/wiki/API#effects))
### API
- Added** way more methods to the
- Needed fix for users on 1.21.6+**
- Added** a new config option that allows using the
/killcommand to kill players with the KILL_PLAYER effect as that's more consistent across different server software than using the API
- Added** meta effects WHEN_DAMAGED & WHEN_HEALED. These allow triggering effects only when conditions are met due to the player taking damage or regenerating. For example,
when_damaged/sound/minecraft:entity.bogged.hurtateffects.BODY.INTERMEDIATEwould trigger the sound when the state of your body changes from NEARLYFULL to INTERMEDIATE (damage), but NOT when it changes from DAMAGED to INTERMEDIATE (regeneration).
- Categorized** effects into persistent, one-time and meta effects
- Improved** effect keyword matching to allow case-insensitive identifiers
- Updated** validation methods to reflect the above
- Corrected** config comments
- Added** a new positioning option that allows you to specify an anchor point for BodyHealth's HUD (e.g. BOTTOM_LEFT). The HUD's position will always be relative to that anchor point, no matter the screen ratio and resolution, and the correct offsets are automatically calculated and applied for you. The anchor point therefore effectively changes the HUD's default position to one of nine possible places from where you can still move it in all directions with the offset values from the last update.
- Added** a new option in the display section that automatically reloads BetterHud together with BodyHealth when enabled to instantly apply any changes there.
- Improved** the PREVENT_JUMP and PREVENT_WALK effects to handle their attribute modifiers more consistently and hopefully never leave them applied under any circumstances ever again due to other plugins interfering with them.
- Sidenote:*** *When repositioning the HUD, always adjust the anchor point first* ***and then*** *use the offsets from last update if needed*.
- Added** SOUND effect to play sounds to only the target player
- Added** an option to disable BetterHud's entity popup feature
- Added** customizable offsets to BodyHealth's HUD (can be found in a new "position" category at display.betterhud)
- Added** yet another safety feature for attribute modifiers to ensure they are removed correctly in any case
- Updated** the effect config's default values to include the new SOUND effect and to match the newest version's syntax
- Improved** the three display.betterhud.disable options to re-enable the respective features when set to false
- Improved** the display.betterhud.as-default option to be reversible too
- Fixed** a few typos here and there (mostly internal + debug messages)
- Removed** fix-height option in favor of the new offsets
- Fixed** an incompatibility with MyWorlds
- Improved** addon name extraction process to handle more complex names and version patterns
- Fixed** various typos in method descriptions, debug messages and config files
All messages (except debug messages) can now use MiniMessage formatting in addition to legacy color/formatting codes like &c (red). Some things like coloring the shadow of your text isn't possible in Minecraft, as this is handled client side, but you can now use all 16.7M colors in the RGB spectrum, add hover text to your messages, execute commands when someone clicks them and much more!

Messages sent to players may now also contain PAPI placeholders to show your players additional information like.... the current date and time for example (hover text):

BodyHealth's default messages are still formatted using legacy codes due to them being much shorter.
- Storage update!**
- Added** SQLite storage type (new default)
- Added** MySQL storage type for multi server environments
- Improved** data handling to only load data needed at a given time, unloading and saving data for players when they disconnect, etc.
With SQLite being the new default storage method, loading times should no longer scale with the number of players of which data is stored that much, resulting in loading times hundreds if not thousands of times faster than before, depending on how many entries there are in your YAML storage. Speaking of which, it is still available to use, as it's way more readable and therefore great for debugging.
You can find storage settings in a new config section between the raytracing- and body-health settings within config.yml \:)
- Changed** Reorganized BodyHealth's config internally
- Improved** HUD is now also shown to players in adventure mode<br>
- Improved** Better handling and logging of regeneration caused by external plugins
- Changed** Assembled resource packs now have their own output folder and the existing packaging process of BetterHud's assets to a usable resource pack has been updated to:<br>
...make it a little more presentable by reworking the pack's description and adding sort of a gradient<br>
...allow customizing the filenames of generated resource packs
- Added/Fixed** This update introduces a new config option at display.betterhud.fix-height (true/false) that attempts to fix an issue with BodyHealth's HUD being pushed down by other HUDs when activated. Do NOT activate this setting unless this happens to you.
- Improved** Body parts are now case-insensitive across all commands
- Fixed** Mc 1.21.3 introduced a bug that renders it impossible to retrieve the block that damaged a player under certain circumstances (e.g. lava). BodeHealth now applies damage to all body parts in these cases, instead of spamming errors. ([PaperMC/Paper#11984](https://github.com/PaperMC/Paper/issues/11984))