Skip to content

Effects

Mitality edited this page May 19, 2026 · 8 revisions

This page explains all effects that are available to be used in BodyHealth's effect configuration.

Information on how to use effects in general can be found here.

Persistent effects

Persistent effects are active as long as conditions are met

ATTRIBUTE_MODIFIER

Applies an attribute modifier to the player.

Syntax: ATTRIBUTE_MODIFIER / <ATTRIBUTE> / <VALUE> / [OPERATION] / [KEY]

  • <ATTRIBUTE> ➜ The attribute to modify. Attributes are explained here.

Warning

Not all attributes are applicable to players! If you choose one that isn't, BodyHealth with warn you with a red message in your server console.

  • <VALUE> ➜ The numeric value the attribute modifier should have.
  • [OPERATION] ➜ How the attribute modifier's value should be added. Explained here.
  • [KEY] ➜ An identifier for the applied attribute modifier. Modifiers with the same key override each other.

Example: ATTRIBUTE_MODIFIER / MOVEMENT_SPEED / -0.2 / add_multiplied_total / my_identifier …decreases the player's movement speed by 20%

POTION_EFFECT

Applies a potion effect to the player for as long as the condition is met. The effect is applied with infinite duration, or refreshed every few seconds in repeating mode (see apply-potion-effects-repeatedly in config.yml).

Syntax: POTION_EFFECT / <EFFECT> / [AMPLIFIER]

  • <EFFECT> ➜ The potion effect type to apply, e.g. SLOWNESS or WEAKNESS.
  • [AMPLIFIER] ➜ The strength of the effect (level = amplifier). Defaults to 1 if not specified. Clamped between 1 and 255.

Note

If the player already has the same effect at a higher or equal amplifier (from another body part state), the weaker one is silently ignored. When the stronger effect is removed, the next highest amplifier that is still required takes its place automatically.

Note

By default, potion effect particles, icons, and the ambient flag are all hidden. This is controlled by the hide-potion-effects setting in config.yml.

Example: POTION_EFFECT / SLOWNESS / 2 …applies Slowness II

PREVENT_INTERACT

Prevents the player from interacting (right-clicking) with a specific hand.

Syntax: PREVENT_INTERACT / <HAND> / [MESSAGE]

  • <HAND> ➜ Which hand to block. Must be HAND (main hand) or OFF_HAND.
  • [MESSAGE] ➜ A message to show the player when they try to interact. Supports all message formats.

Note

If always-allow-eating is enabled in config.yml (it is by default), players can still consume food items regardless of this effect.

Example: PREVENT_INTERACT / OFF_HAND / actionbar:&cYou arm hurts badly!

PREVENT_HOLD

Prevents the player from holding items in a given hand. Any item currently in the blocked hand is immediately dropped when the effect activates. Picking up items, switching hotbar slots, swapping hands, and clicking items into the blocked slot via inventory are all intercepted.

Syntax: PREVENT_HOLD / <HAND> / [MESSAGE]

  • <HAND> ➜ Which hand to block. Must be HAND (main hand) or OFF_HAND.
  • [MESSAGE] ➜ A message to show the player when an item is dropped from their hand. Supports all message formats.

Example: PREVENT_HOLD / HAND / actionbar:&cYou can't hold items in a broken hand!

PREVENT_SPRINT

Prevents the player from sprinting. When the player starts sprinting, their movement speed is silently reduced to walking speed via an attribute modifier. The player can still walk normally.

Syntax: PREVENT_SPRINT / [MESSAGE]

  • [MESSAGE] ➜ A message to show the player when they attempt to sprint. Supports all message formats.

Example: PREVENT_SPRINT / actionbar:&cYou can't sprint with an injured leg

PREVENT_WALK

Prevents the player from walking entirely, by reducing their movement speed attribute to zero. The player can still be knocked back.

Syntax: PREVENT_WALK

Note

If lenient-movement-restrictions is enabled in config.yml, approximately 15% of the player's movement speed is preserved instead of being fully removed, so they are not completely stuck.

Example: PREVENT_WALK

PREVENT_JUMP

Prevents the player from jumping, by reducing their jump strength attribute to zero. The player can still climb stairs, slabs, and other walkable geometry.

Syntax: PREVENT_JUMP

Note

If lenient-movement-restrictions is enabled in config.yml, approximately 15% of the player's jump strength is preserved instead of being fully removed.

Example: PREVENT_JUMP


One-time effects

One-time effects activate once when the condition is first met

PARTICLE

Spawns a particle effect at a given location when the condition is met. This is a one-time effect — use REPEATING to spawn particles on a loop.

Syntax: PARTICLE / <PARTICLE> / [POS] / [COUNT] / [OFFSET] / [SPEED] / [FORCE] / [GLOBAL] / [DATA]

  • <PARTICLE> ➜ The particle type to spawn, e.g. FLAME or DUST.
  • [POS] ➜ Where to spawn the particle. Defaults to the player's location. See Position format below.
  • [COUNT] ➜ How many particles to spawn. Defaults to 1.
  • [OFFSET] ➜ Random spread of particles in each axis. Format: three numbers separated by spaces, commas, or both (e.g. 0.5, 0.5, 0.5). Defaults to 0 0 0.
  • [SPEED] ➜ Particle velocity. Defaults to 0.
  • [FORCE]true or false. When true, the particle is visible at a greater distance and bypasses the player's particle settings. Defaults to false.
  • [GLOBAL]true or false. When true, the particle is visible to all nearby players. When false, only the affected player sees it. Defaults to false.
  • [DATA] ➜ Extra data required by certain particle types. See Particle data below.

Position format

The position argument accepts coordinates in three space- or comma-separated values (e.g. ~ ~1 ~ or ~,~1,~). All three coordinate styles can be mixed freely:

  • Absolute (10 64 -30) ➜ exact world coordinates
  • Relative (~ ~1.5 ~) ➜ offset from the player's position (~ alone means +0)
  • Local (^ ^ ^0.5) ➜ offset relative to the direction the player is facing (^left ^up ^forward)

Note

When the given y-coordinate is an absolute or relative position, the result is computed relative to the player's feet location. When it is a local offset (^), the player's eye location is used as a starting point.

Particle data

Some particles require an extra [DATA] argument. Values within the data argument are separated by spaces, commas, or both:

Particle(s) Data format Example
DUST / REDSTONE R G B SIZE (R/G/B: 0–255, SIZE: float) 255 0 0 1.0
DUST_COLOR_TRANSITION R1 G1 B1 R2 G2 B2 SIZE 255 0 0 0 255 0 1.0
ITEM / ITEM_CRACK material (e.g. diamond_sword) diamond_sword
BLOCK_CRACK / BLOCK_DUST / FALLING_DUST etc. block_type (e.g. stone) stone
SCULK_CHARGE roll (float) 0.5
SHRIEK delay (integer) 10
EFFECT / INSTANT_EFFECT etc. R G B POWER (R/G/B: 0–255, POWER: float) 0 0 255 1.0
TRAIL R G B DURATION (R/G/B: 0–255, DURATION: ticks) or
TX TY TZ R G B DURATION (target supports ~ and ^ notation)
^ ^ ^5 0 0 255 20

Example: PARTICLE / DUST / ~ ~2.25 ~ / 5 / 0.3 0.3 0.3 / 0 / false / false / 255 0 0 1.0 …spawns 5 red dust particles above the player

COMMAND

Executes a command as the console when the condition is met.

Syntax: COMMAND / <command>

  • <command> ➜ The command to run, without the leading /. The following placeholders are available:
    • %PlayerName% ➜ replaced with the player's name
    • %PlayerUUID% ➜ replaced with the player's UUID
    • %BodyPart% ➜ replaced with the affected body part name (e.g. LEG_LEFT)

Note

Unlike most effects, the COMMAND effect does not use / as a separator between its arguments. Everything after the first / is treated as one single command string.

Example: COMMAND / say %PlayerName% broke their %BodyPart%!

COMMAND_UNDO

The inverse of COMMAND. Does nothing when the condition is first met, but executes a command as the console when the condition is no longer met (i.e. when the state is left). Useful for undoing something a paired COMMAND set up.

Syntax: COMMAND_UNDO / <command>

  • <command> ➜ Same format and placeholders as COMMAND.

Note

Like COMMAND, everything after the first / is one command string.

Example: COMMAND_UNDO / effect clear %PlayerName% minecraft:speed

SOUND

Plays a sound when the condition is met. Accepts both vanilla Minecraft sound IDs and custom resource pack sounds.

Syntax: SOUND / <ID> / [VOLUME] / [PITCH] / [GLOBAL]

  • <ID> ➜ The sound identifier, e.g. entity.player.hurt or minecraft:entity.bogged.hurt. Namespaced and non-namespaced IDs are both accepted.
  • [VOLUME] ➜ Volume of the sound. Defaults to 1.0. Also affects the range at which the sound can be heard.
  • [PITCH] ➜ Pitch of the sound. Defaults to 1.0.
  • [GLOBAL]true or false. When true, all nearby players can hear the sound. When false, only the affected player hears it. Defaults to false.

Example: SOUND / entity.warden.heartbeat / 1 / 0.75 …plays the warden heartbeat sound at 75% pitch, only to the affected player

MESSAGE

Sends a message to the affected player when the condition is met.

Syntax: MESSAGE / <MESSAGE>

Example: MESSAGE / <red>Take care of your body!

KILL_PLAYER

Kills the player when the condition is met. The method used is controlled by the kill-with-command setting in config.yml (defaults to using /kill, which is more consistent across server software).

Syntax: KILL_PLAYER

Example: KILL_PLAYER


Meta effects

Meta effects wrap other effects to control when or how often they fire

Note

Meta effects cannot wrap persistent effects — they only work with one-time effects and other meta effects.

CHANCE

Triggers another effect chance based (0.0-1.0). You can group multiple of these together, even across body parts, but only within the same game tick.

Syntax: CHANCE / <CHANCE> / [KEY] / <EFFECT[...]>

  • <CHANCE> ➜ The chance of the given effect being executed. 0.0 means 0% chance, 1.0 means 100% chance.
  • [KEY] ➜ Group key (string of text) to group multiple chance effects together.
  • <EFFECT[…]> ➜ The effect to be triggered chance based.

Example: CHANCE / 0.5 / MESSAGE / actionbar:&aYou feel good! …sends the message with a 50% chance

REPEATING

Repeatedly triggers another effect at a set interval for as long as the condition is met. The effect stops automatically when the condition is no longer met.

Syntax: REPEATING / <delay> / <interval> / <EFFECT[…]>

  • <delay> ➜ How long to wait before the first trigger. Supports time units (see below).
  • <interval> ➜ How often to repeat after the first trigger. Supports time units (see below).
  • <EFFECT[…]> ➜ The effect to repeat, written inline using the same /-separated syntax.

Time units

Both <delay> and <interval> accept a number followed by an optional unit suffix:

Suffix(es) Unit
(none), t, tick, ticks Ticks (1 tick = 0.05 s)
s, sec, secs, second, seconds Seconds
m, min, mins, minute, minutes Minutes
h, hr, hrs, hour, hours Hours
d, day, days Days

Example: REPEATING / 10t / 5s / SOUND / entity.warden.heartbeat / 1 / 0.75 …plays the sound after 10 ticks, then every 5 seconds

DELAYED

Triggers another effect once, after a delay, when the condition is met. If the condition is no longer met before the delay expires, the effect is cancelled.

Syntax: DELAYED / <delay> / <EFFECT[…]>

  • <delay> ➜ How long to wait before firing. Supports the same time units as REPEATING. A delay of 0 fires immediately.
  • <EFFECT[…]> ➜ The effect to trigger after the delay.

Example: DELAYED / 1s / MESSAGE / actionbar:&aYou feel a little better …sends the message 1 second after the condition is entered

WHEN_DAMAGED

Wraps another effect so it only fires when the condition was entered due to the player taking damage (not due to regeneration).

Syntax: WHEN_DAMAGED / <EFFECT[…]>

  • <EFFECT[…]> ➜ The effect to trigger only on damage.

Example: WHEN_DAMAGED / MESSAGE / actionbar:&cOuch! …only shows the message when damage caused the state change, not when healing triggered a re-entry

WHEN_HEALED

The inverse of WHEN_DAMAGED. Wraps another effect so it only fires when the condition was entered due to regeneration (not due to damage).

Syntax: WHEN_HEALED / <EFFECT[…]>

  • <EFFECT[…]> ➜ The effect to trigger only on healing.

Example: WHEN_HEALED / DELAYED / 1s / MESSAGE / actionbar:&aYou feel a little better


Message formats

The [MESSAGE] argument (used in MESSAGE, PREVENT_INTERACT, PREVENT_HOLD, and PREVENT_SPRINT) supports three display styles:

Prefix Behaviour
(none) Sent as a normal chat message
actionbar: Displayed in the action bar above the hotbar
title: Displayed as a title/subtitle pair, separated by ;

All message formats support MiniMessage formatting as well as legacy color codes like &c (red). PlaceholderAPI placeholders are also supported everywhere.

Examples:

MESSAGE / actionbar:&cYour head is pounding
MESSAGE / title:<red>BROKEN ARM;<gray>You can't hold anything
MESSAGE / &eYour &cleg &eis broken!

Clone this wiki locally