πEnchantments
Want to display enchantment description in my lore?
Go to EnchantmentSlots.
Want mob to be able to use enchantments as well?
Because it is somewhat unreliable for enchantments to work on both mobs and players simultaneously, this function has been separated into EnchantedMobs.
Custom enchantments are read recursively from:
plugins/EnchantmentReform/enchantments/Subdirectories may be used to organize armor, melee, ranged, tools, fishing, curses, or any custom category. The YAML key is the authoritative Minecraft registry key; the file path is an administrative identifier and should also remain unique.
Selected vanilla definitions can be customized from:
plugins/EnchantmentReform/vanilla_enchantments/Vanilla overrides are also bootstrap data and require a restart. Read Vanilla Enchantment Overrides for partial replacement rules, available fields, effects behavior, disabling vanilla enchantments, and complete examples.
Registry and runtime layers
An enchantment has two different layers:
Registry data is created during server bootstrap. It includes the namespaced key, supported and primary items, max level, weight, enchanting costs, anvil cost, active slots, exclusivity, curse state, obtaining sources, and native
effectscomponents.Runtime power data is evaluated while the server is running. It includes variables, triggers, conditions, modifiers, abilities, cooldowns, chances, and state.
Registry data is frozen after bootstrap. Runtime data may be re-read where the current reload implementation supports it, but reload cannot add or remove a registry entry or rebuild native effects.
Complete structure
Vanilla enchantment overrides
Files under vanilla_enchantments/ target an existing minecraft: enchantment rather than registering a new key:
Vanilla overrides are partial:
an omitted registry field keeps the original vanilla value;
a present field replaces that value during Paper registry bootstrap;
omitting
effectskeeps the original native mechanic;effects: {}removes all original native effect components;a populated
effectssection completely replaces the original effect map;variablesandpowersadd EnchantmentReform runtime behavior independently of the native registry effect.
The file name is used as the default key, so protection.yml targets minecraft:protection. An explicit override key must use the minecraft namespace.
Read Vanilla Enchantment Overrides before changing an existing vanilla enchantment. It documents platform support, all supported fields, inheritance behavior, item sets, exclusivity, active slots, disabling, reload requirements, and complete examples.
Registry fields
enabled
Disables loading when false.
key
Required namespaced Minecraft enchantment key. Keep it unique and stable.
name
Display text or language placeholder.
description
Description used by compatible UI or lore integrations.
supported-items
Item tag or supported-item definition accepted by the enchantment.
primary-items
Preferred subset used by vanilla enchanting behavior where supported.
exclusive-with
Enchantment keys or exclusivity definitions that cannot coexist.
max-level
Maximum registered level.
rarity
Looks up defaults from config.yml -> rarity.
weight
Candidate selection weight; may override the rarity default.
anvil-cost
Base anvil cost; may override the rarity default.
minimum-cost / maximum-cost
Enchanting power formulas by level.
active-slots
Equipment slots in which powers and equipment-dependent native effects are active.
obtaining-sources
Natural acquisition routes allowed for this enchantment.
execution-priority
Cross-enchantment runtime order; higher values run first.
effects
Minecraft-native enchantment effect components decoded by the current server version.
Registry fields require a full restart after changes. Ensure these fields are valid, otherwise the server may fail while loading the enchantment registry.
Runtime fields
variables
Reusable level-based or calculated values used by descriptions and powers.
allow-duplicate
Defaults to false. When true, each equipped occurrence of the enchantment executes its power.
powers
Runtime triggers, power-wide limits, conditions, modifiers, abilities, and activation abilities.
The complete powers syntax is documented separately on the Power configuration page. Keeping the runtime reference there avoids mixing registry fields with event execution rules.
Supported and primary items
Prefer reusable tags declared in config.yml -> supported-items.tags:
Depending on the field implementation, a list may also be accepted. Use namespaced keys consistently and confirm the resulting item set in the catalogue.
Active enchantments
An enchantment becomes active only when its item is in a configured active-slots slot. Typical values include:
HANDMAINHANDOFFHANDHEADCHESTLEGSFEETBODYARMORANY
Paper equipment lifecycle changes can fire:
on-activate: the enchantment has become active;on-deactivate: the enchantment is no longer active.
The active item and slot determine which enchantments participate when an event trigger is processed. Minecraft also uses the registered active slots for native equipment-dependent effects, such as attribute modifiers.
Obtaining sources
Common source values used by bundled enchantments include:
ENCHANTING_TABLEVILLAGER_TRADERANDOM_LOOTTRADED_EQUIPMENT
Only list routes in which the enchantment should naturally participate. Commands or other plugins may still apply registered enchantments directly.
Rarity inheritance
When weight, enchanting costs, or anvil-cost are omitted, EnchantmentReform can inherit them from the selected rarity in config.yml.
This lets many enchantments share a progression model while still allowing per-enchantment overrides.
Execution priority
execution-priority controls the order when several active enchantments handle the same event. Higher values execute first; equal values are ordered deterministically by enchantment key.
Use distinct priorities when one enchantment intentionally prepares context for another, such as changing a block before a second enchantment inspects it.
Native effects
The root effects section is a direct YAML representation of Minecraft's native enchantment effect-component data:
effects and powers are different systems:
effectsis handled by Minecraft's native enchantment engine and must match the current server version's native codec;powersis handled by EnchantmentReform and supports plugin triggers, conditions, modifiers, abilities, cooldowns, chance, and state;both sections may be used in the same enchantment.
Plugin expressions such as {level} and root variables are not expanded inside effects. Native level scaling must use Minecraft structures such as minecraft:linear.
Read Native Enchantment Effects for JSON-to-YAML conversion, field rules, attribute effects, conditional damage immunity, location effects, validation errors, and complete examples.
Variables
Root variables are reusable in descriptions and powers:
String variables are substituted as text. Numeric variables may be evaluated as expressions by fields that support mathematical values.
Variables are declared at the enchantment root, not inside powers. They are not expanded inside native effects.
Powers
The powers section follows the same trigger β condition β modifier β ability model used by EnchantedMobs, but it belongs inside an enchantment file:
Power-wide limits belong under powers.limit. Trigger sections contain trigger-specific options plus conditions, modifiers, and abilities.
Read Power configuration for the execution order, variables, limits, trigger sections, activation abilities, projectile continuation, and complete examples.
Related pages
Last updated