π₯Power configuration
An enchantment power defines:
whether the runtime power is enabled;
the shared activation limits used by its triggers;
when the power activates;
which conditions, modifiers, and abilities run for each trigger.
Unlike EnchantedMobs, EnchantmentReform does not store each power in a separate file. The power is the powers section inside an enchantment file located under:
plugins/EnchantmentReform/enchantments/The surrounding enchantment file defines registry information such as supported items, levels, rarity, and active slots. This page focuses only on its runtime variables and powers sections.
Quick start
powers:
on-melee-attack:
abilities:
ignite-target:
type: fire
target: TARGET
fire-ticks: 100When the enchanted item is active and its owner directly attacks an entity, the target burns for 100 ticks.
Power structure
variables
Defines reusable level-based or calculated values for the enchantment. This section is outside powers.
powers.enabled
Enables or disables the enchantment's runtime power without changing its registry entry.
powers.limit
Controls power-wide chance, cooldown, and usage count.
powers.on-...
Defines one trigger's conditions, modifiers, and abilities.
powers.activation-abilities
Defines special abilities evaluated while deciding whether an enchantment is active.
The keys directly below powers are normally built-in triggers such as on-attack, on-damage, on-block-break, or on-fish. The exceptions are the common options above and the special activation-abilities section.
Execution flow
When a matching event occurs, EnchantmentReform processes an active enchantment in this order:
Conditions at the same level must all match.
Modifiers execute in YAML order and update supported event result data.
Abilities execute in YAML order after modifiers.
A trigger or child entry that requires unavailable context is skipped.
Tracked projectile continuation may reuse the power captured at launch instead of rerolling the power-wide limit.
powers.limit is checked before trigger conditions. A configured cooldown or usage count can therefore be acquired even when a later condition causes the trigger section to be skipped.
See Power Triggers for the context supplied by each trigger and the meaning of SOURCE, SKILL, and TARGET.
Variables and dynamic values
Variables avoid repeating the same formula throughout an enchantment:
Depending on the field, values may support:
{level}orlevel;enchantment variables such as
{damage-multiplier};formulas such as
4 + {level} * 0.5;ranges such as
1~3or0.5~1.5;level selector maps;
runtime placeholders such as
{source_health},{target_health_percent}, and{distance};PlaceholderAPI when a player context is available.
Not every runtime placeholder is available for every trigger or ability. See Math Calculate Format for expression syntax.
Power-wide limits
random
1
Activation chance. 1 means 100%.
cooldown
0
Shared power cooldown in seconds.
times
0
Maximum successful top-level limit passes for the power. 0 means unlimited.
These options belong under powers.limit, not inside an individual on-... trigger section.
Supported numeric fields may use formulas, variables, ranges, or level selector maps.
Trigger section
Every normal trigger uses the same basic layout:
Names such as fire-damage, reduce-fire-damage, and smoke are user-defined entry IDs. They only need to be unique inside their own section. The type value selects the registered condition, modifier, or ability implementation.
conditions
Conditions decide whether the trigger continues. Entries use logical AND by default.
Both conditions must pass. Use the any condition when one of several branches should be sufficient.
See Power Condition Reference.
modifiers
Modifiers change mutable data supplied by the current trigger before abilities run.
Examples include:
damageon attack or damage triggers;foodon food-level changes;item_damageon item durability damage;fishing modifiers on compatible
on-fishstates;trade modifiers on merchant trade triggers;
warden_angeron Warden anger changes.
A valid modifier used with an unrelated trigger has no compatible result to change. Use the plural key modifiers.
abilities
Abilities perform actions in YAML order. They may consume entities, items, blocks, locations, projectiles, or other data supplied by the trigger.
EVENT_BLOCK only works when the selected trigger supplies a block. Individual abilities may also support their own conditions, chance, cooldown, usage limit, or child abilities as documented by that ability.
See Ability Reference.
Trigger-specific options
Some triggers add options beside conditions, modifiers, and abilities. For example, tick triggers support interval:
Trigger-specific options are documented on the Power Triggers page.
Activation abilities
activation-abilities is not an event trigger. It is evaluated while EnchantmentReform scans an item and decides which enchantments are active.
The built-in disable_enchantments ability can suppress matching enchantments found on the same item:
The enchantment declaring the rule does not disable itself. Normal trigger conditions, modifiers, and powers.limit do not apply to this special section.
Multiple triggers
One enchantment may define multiple trigger sections:
The launch trigger captures the power for projectile continuation, the tick trigger creates a trail, and the hit trigger handles the final impact.
Complete example
The enchantment adds damage when the target is below 30% health, then plays sound and particle feedback.
Related references
Enchantments: registry fields and the complete enchantment file structure.
Power Triggers: trigger contexts, event differences, result compatibility, and projectile continuation.
Power Condition Reference: every built-in condition.
Power Modifier Reference: every built-in modifier.
Ability Reference: every built-in ability.
Last updated