For the complete documentation index, see llms.txt. This page is also available as Markdown.

Power Triggers

A trigger is an on-... section inside a mob power. It decides when the power runs and creates the context consumed by Power Conditions, Power Modifiers, and Abilities.

on-attack:
  conditions: {}
  modifiers: {}
  abilities: {}

EnchantedMobs registers 18 built-in triggers.

Reference pages

Common context

Context
Meaning

OWNER

The powered mob that owns the power.

SOURCE

Entity responsible for the current action.

SKILL

Direct carrier or intermediate entity such as a projectile or exploding entity.

TARGET

Final affected or inspected entity.

LOCATION

Main event location.

EVENT

Underlying Bukkit/Paper event.

TICK

Runtime tick for periodic triggers.

Missing or incompatible context causes dependent conditions, modifiers, or abilities to fail or skip safely.

Numeric trigger context

Numeric trigger extras are available to context-aware string and mathematical fields as {key_name} placeholders. For example, compatible damage triggers provide {original_damage}, ranged triggers may provide {bow_force}, and targeting contexts may provide {target_count}.

A placeholder exists only when the current trigger supplied that value. See Math Calculate Format for the complete list, value types, resolution order, and examples.

Trigger list

Tick and Lifecycle Triggers

Combat, Damage, and Death Triggers

Projectile and Ranged Triggers

Block and Interaction Triggers

No built-in triggers.

Item, Enchanting, and Equipment Triggers

No built-in triggers.

Movement and Input Triggers

No built-in triggers.

Effects, Air, Food, and Experience Triggers

No built-in triggers.

Fishing and Trading Triggers

No built-in triggers.

Targeting and Special-Entity Triggers

Projectile continuity

on-shoot-bow and on-projectile-launch can capture exact power IDs for a projectile. on-projectile-tick and on-projectile-hit run only those captured powers and do not reroll the top-level power limit. Replacing a projectile transfers tracking only when the replacement is another projectile.

Last updated