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

⚑Power Triggers

A trigger is a section under an enchantment's powers. It decides when the power runs and creates the context consumed by Power Conditions, Power Modifiers, and Abilities.

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

EnchantmentReform currently registers 61 built-in triggers.

Reference pages

Common context

Every trigger creates a TriggerData context. The exact value of each role depends on the selected trigger.

Context
Meaning

PLAYER

The player whose active enchanted item supplied the power. This is always present.

SOURCE

The actor or owner responsible for the event.

SKILL

The direct carrier or intermediate entity, such as a projectile, hook, firework, or Warden.

TARGET

The final affected or inspected entity.

BLOCK

The event block when the trigger supplies one.

LOCATION

Main event location used by location-aware conditions and abilities.

FROM / TO

Movement origin and destination when supplied.

TRIGGER_ITEM / TRIGGER_SLOT

Item and slot that selected the active enchantment.

EVENT

Underlying Bukkit/Paper event.

TICK

Runtime tick for periodic triggers.

SOURCE, SKILL, TARGET, BLOCK, movement locations, and trigger-item data are optional. A condition or ability that requires missing context fails or skips safely.

Do not assume the same selector has the same meaning across every trigger. For example, on-attack uses SOURCE for the attacking player and SKILL for the direct projectile/damager, while on-damage uses TARGET for the enchanted player receiving damage.

Trigger list

Tick and lifecycle triggers

Combat, damage, and death triggers

Projectile and ranged triggers

Block and interaction triggers

Item, enchanting, and equipment triggers

Movement and input triggers

Effects, air, food, and experience triggers

Fishing and trading triggers

Targeting and special-entity triggers

Choosing compatible conditions and modifiers

Choose the trigger first, then open its category page and verify the available Context.

Examples:

  • the damage modifier requires a trigger with mutable damage data;

  • item_damage requires on-item-damage;

  • fishing result modifiers require on-fish and the appropriate fishing state;

  • trade modifiers require on-purchase or on-trade;

  • warden_anger requires on-warden-anger-change;

  • block conditions require a trigger that supplies BLOCK;

  • entity-targeted abilities must use a selector that is present for that trigger.

Extension triggers

Other plugins may register custom triggers through the EnchantmentReform API. Custom trigger keys and their Context are defined by the extension and are not included in this built-in list.

Last updated