Enchantment Definition
The Enchantment Definition allows you to register a new custom enchantment with specific properties, triggers, and compatibility rules.
Configuration
enchantment_definition — Map
Configuration for the enchantment.
Properties
id
Unique identifier for this enchantment.
name — String
Internal name.
displayName — String
Display name shown in GUIs.
enchantmentLore — String
Lore line added to items (supports colors).
nameColor — String (MiniMessage tag)
Color of the enchantment name on items. Uses MiniMessage syntax (e.g. 'gray', 'gold', '#ff5555'). supportedItems
">
List of item types that can receive this enchantment.
maxLevel — Int
Maximum obtainable level.
weight — Int
Rarity weight for random selection.
anvilCost — Int
XP levels required to combine in an anvil.
minimumCost — Map
Cost
base
Base cost.
perLevel — Int
Cost per level.
maximumCost — Map
Cost
base
Base cost.
perLevel — Int
Cost per level.
activeSlots
" default="[]">
Equipment slots the enchantment is active in (ANY, HAND, MAINHAND, OFFHAND, ARMOR, HEAD, CHEST, LEGS, FEET, BODY). Empty means armor + hands.
exclusiveWith
" default="[]"> Enchantments that cannot coexist with this one on the same item (enforced in the anvil). treasureChance —
Int
Chance (0-100%) for this enchantment to appear as a book in generated loot chests.
tradeChance — Int
Chance (0-100%) for librarian villagers to sell this enchantment instead of a vanilla book trade.
cooldownEnabled — Boolean
Whether triggers use a cooldown.
cooldown — Duration
Time between active triggers firing. criteria
"> Conditions required for the enchantment to be active. activeTriggers
">
Active Triggers
level
Level for these triggers. triggers
">Triggers fired while active.
inactiveTriggers
" default="[]"> Triggers fired when the enchantment becomes inactive.