Custom Enchantment Definition
Type:custom_enchantment_definition
Tags: custom_enchantment_definition
Defines a custom enchantment with modular mechanics rather than cooldown-based triggers. Unlike enchantment_definition, this entry uses EnchantmentMechanic to compose behaviors from multiple game events.
When to Use
| Use Case | Entry Type |
|---|---|
| Cooldown-based active triggers | enchantment_definition |
| Modular mechanics (multi-event, chance, levels) | custom_enchantment_definition |
Configuration
| Field | Type | Default | Description |
|---|---|---|---|
id | String | "" | Unique identifier for this entry |
name | String | "" | Internal name |
displayName | String | "" | Display name shown in GUIs |
enchantmentLore | String | "" | Lore line added to items (supports MiniMessage colors) |
nameColor | String (MiniMessage tag) | "gray" | Color of the enchantment name. Uses MiniMessage syntax (e.g. gray, gold, #ff5555) |
supportedItems | List<Material> | [] | Item types that can receive this enchantment |
anvilCost | Int | 1 | XP levels required to combine in an anvil |
maxLevel | Int | 1 | Maximum obtainable level |
weight | Int | 1 | Rarity weight for random selection |
minimumCost | Cost | {} | Minimum cost when enchanting (see below) |
maximumCost | Cost | {} | Maximum cost when enchanting (see below) |
mechanics | List<EnchantmentMechanic> | [] | Modular mechanics for this enchantment |
Cost
| Field | Type | Default | Description |
|---|---|---|---|
base | Int | 0 | Base cost |
perLevel | Int | 0 | Cost per level |