Repository navigation
Command Usage
Syntax and arguments as of modversion: 1.5.0 or higher
/health add <targets> <amount> [<expandMaxHealth>]
Adds the specified amount of health to the target(s). If expandMaxHealth is true, an increase above the target's current maximum health also increases the maximum health to match.
If the resulting health is below or equal to the current maximum, the maximum health is not modified. If the resulting health is at or below 0, the target's health is set to 0.
targets:
- Required
- Type: Vanilla target selector
amount:
- Required
- Type: float
- May be positive or negative
expandMaxHealth:
- Optional
- Type: boolean
- Defaults to
false - If
falseand the resulting health exceeds the current maximum, health is capped at the maximum
/health set <targets> <health> [<updateMaxHealth>]
Sets the health of the target(s) to the specified amount.
If updateMaxHealth is true, the target's maximum health is updated to match the new health, including decreasing the maximum health.
If updateMaxHealth is false, health is capped at the target's current maximum health. The minimum value accepted for health is 0.
targets:
- Required
- Type: Vanilla target selector
health:
- Required
- Type: float
- Minimum:
0
updateMaxHealth:
- Optional
- Type: boolean
- Defaults to
false
/health get <targets>
Returns the current health of each selected living entity.
Entities without the living-health attribute are ignored. For a selection containing exactly one target, the command result is that target's rounded health value.
targets:
- Required
- Type: Vanilla target selector
/health reset <targets>
Removes the maximum-health modifier added by this mod from the target(s). This restores the maximum health as determined by the entity's base value and other modifiers.
targets:
- Required
- Type: Vanilla target selector
Download the mod here:
Curseforge: https://www.curseforge.com/minecraft/mc-mods/health-command
Modrinth: https://modrinth.com/mod/health-command