Admin Guide

Enchant YAML Reference

Complete guide to creating & configuring custom enchants — stats, abilities, mechanics, triggers, formulas, placeholders, and conflict groups.

File Structure

Each enchant is a separate YAML file in the plugins/OmniEnchant/enchants/ folder. File name = enchant ID.

Directory Structure
plugins/OmniEnchant/
├── config.yml                # General settings
├── enchant.yml               # Display & rarity config
├── settings/
│   ├── application.yml       # Drag-drop, success/failure rate
│   ├── display.yml           # Rarity colors, display mode
│   ├── dust.yml              # Lucky Dust config
│   ├── enchant-browser.yml   # Enchant Browser GUI
│   ├── enchant-table.yml     # Custom Enchant Table
│   ├── extraction.yml        # Extraction Scroll config
│   ├── fusion.yml            # Fusion recipes
│   ├── tier-shop.yml         # Tier Shop GUI
│   └── vanilla-enchants.yml  # Vanilla enchant overrides
└── enchants/
    ├── aegis.yml             # Each file = 1 enchant
    ├── divine.yml
    ├── frenzy.yml
    └── ...

Base Fields (Required)

Every enchant YAML file must have these base fields:

enchants/my_enchant.ymlFull example
name: "&6Aegis"                   # Display name (color codes)
lore:                                # Description, {KEY} = placeholder
  - "&8Balanced protection granting &a{HP_PCT}% &8max health"
  - "&8and &a{DEF_PCT}% &8defense."
max-level: 5                       # Maximum enchant level
rarity: EPIC                       # COMMON, UNCOMMON, RARE, EPIC, LEGENDARY
success-rate: 70                   # % base success when applying
failure-rate: 5                    # % destroy item on failure
applicable-to: [CHESTPLATE, HELMET] # Allowed item types
conflicts: [umbra]                # Conflicts with other enchants
!

applicable-to supports: SWORD, AXE, BOW, CROSSBOW, PICKAXE, SHOVEL, HOE, HELMET, CHESTPLATE, LEGGINGS, BOOTS, SHIELD, ARMOR (= all armor), WEAPON (= all weapons).

Stats — Permanent & Conditional

Add/modify MythicLib stats on items. Supports both permanent and conditional (trigger-based) stats.

Permanent Stats (Always Active)

Example: Warlord (multi-stat)
stats:
  attack-damage:
    formula: "1.5+({level}-1)*1"
    key: AD                           # Placeholder: {AD} in lore
  physical-damage:
    formula: "12+({level}-1)*8"
    key: PD
  critical-strike-chance:
    formula: "5+({level}-1)*2.5"
    key: CSC

Relative Stats (Percentage-Based)

Example: Titan (relative %)
stats:
  attack-damage:
    formula: "2+({level}-1)*1"
    key: AD_PCT
    type: RELATIVE                   # Percentage-based modifier
  max-health:
    formula: "3+({level}-1)*1.5"
    key: HP_PCT
    type: RELATIVE

Conditional Stats (Trigger-Based)

Example: Buff Crit on Attack
stats:
  critical-strike-chance:
    formula: "95+({level}-1)*1"
    key: CSC
    mode: ATTACK                   # MythicLib TriggerType
    chance:
      formula: "5+({level}-1)*5"
      key: CHANCE
    duration:
      formula: "100"             # 100 ticks = 5s
      key: DUR
    cooldown:
      formula: "200"             # 200 ticks = 10s
      key: CD
i

mode uses MythicLib TriggerType: ATTACK, WHEN_HIT, DAMAGED, KILL, RIGHT_CLICK, LEFT_CLICK, SNEAK, TIMER, LOGIN, SHOOT_BOW

Abilities — MythicLib Skills

Attach MythicLib skills to enchants with configurable modifiers.

Example: Divine Heal Ability
ability:
  smite_heal:
    type: HEAL                        # MythicLib SkillHandler ID
    mode: ATTACK
    heal:
      formula: "2+({level}-1)*1"
      key: HEAL
    chance:
      formula: "20"
i

type is the MythicLib SkillHandler ID: FIREBALL, SPARKLE, HEAL, EARTH_SPIKE, FIRE_METEOR, ARCANE_HAIL, FREEZING_CURSE, POWER_MARK, SHULKER_MISSILE...

Mechanics — Custom Engine

40+ custom-coded mechanics independent of MythicLib. Vein mining, telekinesis, auto replant, multiply drops, and more.

Example: Telekinesis
mechanics:
  - type: TELEKINESIS
    mode: BREAK_BLOCK

Available Mechanics

TypeModeDescription
TELEKINESISBREAK_BLOCKAuto-send drops to inventory
VEIN_MINERBREAK_BLOCKMine entire ore veins (BFS)
TREE_FELLERBREAK_BLOCKChop entire trees
MULTIPLY_DROPSBREAK_BLOCKMultiply block drops
SMELTINGBREAK_BLOCKAuto-smelt ore drops
AUTO_REPLANTBREAK_BLOCKAuto-replant crops
EXPLOSIVEBREAK_BLOCKMine in a 3×3 area
LIFESTEALATTACKHeal on each hit
CRITICAL_BOOSTATTACKRandom crit buff
THORNSDEFENDReflect damage
SOUL_HARVESTKILL_ENTITYHarvest souls from kills
EXP_BOOSTBREAK_BLOCK/KILL_ENTITYIncrease EXP drops

Conflict System

Enchants can conflict with each other, preventing both from being on the same item.

Conflict Examples
# divine.yml:
conflicts: [umbra]
# reaper.yml:
conflicts: [ruin]
# bulwark.yml:
conflicts: [vitality]
# juggernaut.yml:
conflicts: [lethality]
i

Conflicts are bidirectional. Define on both sides for clarity.

Formula Engine

All numeric values support formulas with {level} and {item_level} variables.

Formula Syntax
"10"                    # Fixed value
"5+({level}-1)*3"       # Lv1=5, Lv2=8, Lv3=11
"10-({level}-1)*0.5"    # Decreasing (cooldown)
"({level}^2)*2"         # Exponential scaling
"100/{level}"           # Inverse scaling
"-0.5+({level}-1)*-0.2" # Negative (trade-off)

# Supported operators: + - * / ^ ()

Lore Placeholders

Use {KEY} in lore: to display dynamic values from formulas.

PlaceholderSourceDescription
{KEY}stat/abilityFormula value at current level
{DUR}conditional stat/triggerDuration (seconds, auto ÷20)
{CD}conditional stat/triggerCooldown (seconds)
{CHANCE}conditional stat/abilityActivation chance (%)
{CHANCE_ENCHANT}base fieldSuccess rate
{MULT}ability/mechanicMultiplier value

Full Example — Complete Enchant

enchants/frenzy.ymlTrade-off enchant
# Frenzy — High damage at the cost of defense
name: "&cFrenzy"
lore:
  - "&8Increases attack by &a{AD_PCT}% &8and crit"
  - "&8chance by &a{CSC}%&8, but reduces defense by &a{DEF}&8."
max-level: 4
rarity: EPIC
applicable-to: [SWORD]

stats:
  attack-damage:
    formula: "4+({level}-1)*1.5"
    key: AD_PCT
    type: RELATIVE
  critical-strike-chance:
    formula: "6+({level}-1)*1.5"
    key: CSC
  defense:
    formula: "-0.5+({level}-1)*-0.2"
    key: DEF