Migrations
MythicEnchantsLegacyMigrator
A one-off migration tool for servers upgrading from the old Lumine "MythicEnchants 1.x" plugin to the modern MythicEnchants. It is not loaded automatically — nothing runs at boot, and it only touches files when you explicitly ask it to.
Why this is a separate addon
Legacy migration used to run automatically inside core on every enchant-file load. That caused real problems on servers that never had a legacy install: the detection heuristics could misfire on unrelated/hand-written modern enchants and register duplicate-named enchantments. Since migration is a one-time, opt-in operation, it now lives here instead — core no longer touches legacy schemas at all.
Usage
- Drop
MythicEnchantsLegacyMigrator.jarintoplugins/MythicEnchants/addons/. - Restart the server (or reload addons).
- Run
/mench legacymigrateto dry-run — this scansplugins/MythicMobs/Enchantments/(recursively) and reports which files contain old-schema enchantments, without writing anything. - Run
/mench legacymigrate applyto actually rewrite the matched files in place. Each rewritten file gets a one-time<name>.yml.bakbackup alongside it. - Restart the server. The addon only rewrites files on disk — core's
EnchantmentLoaderalready finished parsing enchants for the current boot by the time addons load, so the modernised files take effect on the next start.
Permission: mench.legacymigrate
What gets migrated
Field mapping is verified against the real 1.x plugin source (io.lumine.mythicenchants),
not guessed from a template:
| Legacy (1.x) | Modern |
|---|---|
Cursed / Treasure (top-level) |
Options.Cursed / Options.Treasure |
EnchantableItems (material list) |
SupportedItems (inferred tag) + Enchanting.PrimaryItems (preserved list) |
EnchantingTable.MinExperience / MaxExperience |
Enchanting.MinCost.Base / Enchanting.MaxCost.Base |
EnchantingTable.MinLevel / MaxLevel |
dropped — no modern analogue |
MergeCostPerLevel |
dropped — no safe modern analogue, review anvil cost by hand |
Display, Rarity, MinLevel/MaxLevel, ValidSlots, ConflictingEnchants, Skills, Stats |
unchanged — already schema-compatible |
An Enchanting.Weight of 5 is synthesised for any migrated enchant, since 1.x had no
per-enchant table-weight concept (odds were entirely rarity-driven via a separate
rarities.yml). Tune weights by hand afterward.
Two 1.x-only skill-line conditions have no modern equivalent and are flagged only, never
rewritten — ?enchantlevel{level=N} and ?enchantslot{slot=X}. Review those lines by hand.