Your First Enchant
Enchants are YAML files stored in the enchants/ folder.
Example: Fire Strike
Create fire-strike.yml:
enchant-id: fire-strike
display-name: "&c&lFire Strike"
menu-material: "BLAZE_POWDER"
progression:
starting-level: 1
max-level: 10
activation:
trigger: "HIT_MOB"
base-chance: 25.0
chance-per-level: 2.0
cooldown-seconds: 3
upgrade:
currency: "money"
base-cost: 1000
scaling: "linear"
scaling-multiplier: 1.5
actions:
1:
type: "set-fire"
entity: "{target_mob}"
duration: 100
That's it. This creates an enchant that has a 25% chance (increasing by 2% per level) to set mobs on fire when hit.
Configuration Structure
Every enchant file has the same structure. Let's break down each section.
Name shown in menus (supports color codes like &a, &l, or hex etc.)
Item displayed in the enchants menu (must be valid Minecraft material)
Progression System
Controls how players level up the enchant:
Parameters:
Field
Description
Common Values
Level players start at when they first get the enchant
Maximum level for this enchant
When to use starting level 0:
For enchants that need to be "unlocked" before they work
When you want the first purchase to activate the enchant
When to use starting level 1:
Most common - enchant works immediately at level 1
Players purchase to upgrade, not to unlock
Activation Settings
Controls when and how often the enchant triggers:
Type
When It Activates
Use Cases
When player hits a mob with their sword
Damage effects, particles, chance-based abilities
When the source condition is met
Only activating specific enchants based on other enchants
Reward enchants (currency, healing, explosions)
Always active while sword is held
Potion effects (speed, strength, regeneration), constant enchants?
For advanced custom Java implementations
Complex logic that needs programming
The chance system determines how often your enchant activates.
Formula:
Example:
At level 5: 15 + (5 × 1.5) = 22.5% chance to activate
For PASSIVE enchants: Set base-chance: 100.0 and chance-per-level: 0.0 since they're always active.
Prevents enchant from activating too frequently:
Measured in seconds (not ticks)
Recommended: 2-5 seconds for balanced gameplay
For PASSIVE: use 0 (no cooldown needed)
Determines how much it costs to level up the enchant:
The currency ID that players spend to upgrade. Must match a currency configured in the economy module.
Common currencies:
souls - Secondary currency
sword-xp - Experience points
Custom currency IDs you've created
Determines how costs increase with each level:
Formula: base-cost + (multiplier × level)
Example: Base 500, multiplier 1.2
Level 1: 500 + (1.2 × 1) = 501.2
Level 5: 500 + (1.2 × 5) = 506
Level 10: 500 + (1.2 × 10) = 512
When to use: Gentle cost increase, affordable long-term progression
Exponential Scaling
Formula: base-cost × (multiplier ^ level)
Example: Base 500, multiplier 1.15
Level 1: 500 × (1.15 ^ 1) = 575
Level 5: 500 × (1.15 ^ 5) = 1,005
Level 10: 500 × (1.15 ^ 10) = 2,023
When to use: Costs ramp up quickly, creates endgame grind
Formula: Always base-cost
When to use: Fixed cost per level (rare use case)
Actions Section
Actions are what happen when your enchant activates. This is the "effect" part of your enchant.
Structure:
Actions are numbered (1:, 2:, 3:, etc.)
They execute in order (1 first, then 2, then 3)
Each action has a type and various parameters
Learn More: See Enchant Actions for a complete list of all available actions and their parameters.
Complete Example
Here's a fully configured enchant with explanations:
Naming Conventions
DO:
Use lowercase with hyphens: fire-strike, soul-harvest
Keep IDs short but descriptive
Match filename with enchant-id
DON'T:
Use uppercase: FireStrike
Use special characters: fire_strike!
DO:
Use reasonable particle counts (10-50)
Set appropriate cooldowns (2-5 seconds)
Limit area effect radius (5-15 blocks)
DON'T:
Create no-cooldown spam effects
Make huge damage radius (causes lag)
Testing Your Enchant
Restart / Reload
Restart or reload the server (e.g., /dungeons reload) to load the new enchant file.
Look for any YAML parsing errors or startup warnings in the server console.
Test Activation
Hit or kill mobs depending on the trigger to test the enchant's behavior.
Tweak chances, cooldowns, costs, and actions based on testing results.
Troubleshooting
Enchant Not Activating
Problem: Enchant shows in menu but never triggers
Solutions:
✓ Verify trigger type is correct
✓ Check base-chance isn't too low
✓ Test without cooldown-seconds temporarily
✓ Ensure actions section is properly formatted
✓ Look for errors in console
Wrong Cost Displayed
Problem: Upgrade cost shows incorrect amount
Solutions:
✓ Check scaling type spelling
✓ Verify scaling-multiplier is reasonable
✓ Ensure currency ID exists
✓ Test cost formula with online calculator