S Y N T A X

MythicEnchantsSkript — Syntax Reference

Skript addon for MythicEnchants. Requires Skript 2.15+ and MythicEnchants 5.12+ on Paper 1.21+. Addon version 1.3.0.


Types

Type Code Name Description
MythicEnchants Enchantment menchenchantment A custom enchantment registered through MythicEnchants. Parseable by ID (e.g. "fire_slash" or "mythicenchants:fire_slash").

Events

Of the six events, four are cancellable via Skript's built-in cancel event: enchant apply, enchant remove, prepare enchant, and skill trigger. The two newest event bridges — anvil prepare and trigger fire — are not cancellable; the anvil-prepare event is instead "overridden" by setting mench anvil result (see below).

On Mythic Enchantment Apply

Fires when enchantments are applied to an item via enchanting table or anvil. Cancellable.

[mythic[al]] enchant[ment] apply
mench enchant[ment] apply

Event values: player, item (ItemStack)

Event-only expressions:

  • mench apply source — "TABLE" or "ANVIL"
  • mench event slot — equipment slot name (e.g. "HAND") (shared with the remove event)

Example:

on mythic enchantment apply:
    if mench apply source is "TABLE":
        send "You enchanted %event-item% at the table!" to player

On Mythic Enchantment Remove

Fires when enchantments are removed from an item via grindstone or anvil. Cancellable.

[mythic[al]] enchant[ment] remove
mench enchant[ment] remove

Event values: player, item (ItemStack)

Event-only expressions:

  • mench remove source — "GRINDSTONE" or "ANVIL"
  • mench event slot — equipment slot name (shared with the apply event)

Example:

on mythic enchantment remove:
    if mench remove source is "GRINDSTONE":
        send "Enchantments stripped!" to player

On Mythic Enchantment Skill Trigger

Fires before MythicEnchants dispatches an enchantment's skills. One event fires per (enchantment, trigger) pair. Cancellable — cancelling suppresses that enchantment's skill dispatch only.

[mythic[al]] enchant[ment] skill trigger
mench skill trigger

Event values: player, item (ItemStack), entity (target, nullable), menchenchantment (the definition)

Event-only expressions:

  • mench trigger name — uppercase trigger name (e.g. "ATTACK", "EQUIP", "TIMER") (shared with trigger fire)
  • mench trigger level — enchantment level on the item (skill trigger only)
  • mench trigger damage — final damage value, 0 if not a damage trigger (shared with trigger fire)
  • mench trigger item attack — base item attack value, 0 if not an attack trigger (shared with trigger fire)
  • mench trigger slot — equipment slot name (e.g. "HAND", "CHEST") (shared with trigger fire)

Example:

on mythic enchantment skill trigger:
    if mench trigger name is "ATTACK":
        if mench trigger damage > 20:
            send "Massive hit with %mench id of event-menchenchantment% level %mench trigger level%!" to player
    if mench trigger slot is "CHEST":
        cancel event  # suppress all chest-slot enchant skills

On Mythic Prepare Enchantment

Fires after MythicEnchants computes the three enchanting table offers but before they are shown to the player. Only fires when the custom enchanting table is enabled. Cancellable — cancelling leaves the vanilla offers untouched.

[mythic[al]] prepare enchant[ment]
mench prepare enchant[ment]

Event values: player, item (ItemStack)

Event-only expressions:

  • mench table power — computed table power (typically 0–15, can exceed with custom configs)
  • mench reagent key — normalised reagent key (e.g. "minecraft:lapis_lazuli", "crucible:moondust")

Example:

on mythic prepare enchantment:
    if mench reagent key is "crucible:moondust":
        send "Special reagent detected! Table power: %mench table power%" to player

On MythicEnchants Trigger Fire

Fires whenever a subscribed trigger name fires on an item — including items with no matching enchantment — unlike the narrower skill-trigger event, which only fires per (enchantment, trigger) pair. Use mench subscribe to trigger %string% first to opt into a given trigger name. Not cancellable.

[mythic[al]] enchant[ment] trigger fire
mench trigger fire

Event values: player, item (ItemStack), entity (target, nullable)

Event-only expressions (all shared with the skill-trigger event above):

  • mench trigger name
  • mench trigger damage
  • mench trigger item attack
  • mench trigger slot

Example:

mench subscribe to trigger "BLOCK_BREAK"

on mench trigger fire:
    if mench trigger name is "BLOCK_BREAK":
        send "Trigger fired on %event-item%, even with no matching enchant!" to player

On MythicEnchants Anvil Prepare

Fires after MythicEnchants computes the anvil combine result but before it's shown in the anvil UI. Not cancellable — instead of cancelling, override the outcome by setting mench anvil result. This hook exists specifically so scripts can honor "overleveled" enchanted books past vanilla's level clamp (e.g. allow a level-6 Sharpness book to combine onto a level-6 sword when vanilla would cap it at 5).

[mythic[al]] anvil prepare
mench anvil prepare

Event values: player, item (the result ItemStack)

Event-only expressions:

  • mench anvil left item — the base item (anvil slot 1)
  • mench anvil right item — the sacrifice item (anvil slot 2)
  • mench anvil result — gettable and settable. See below.

Example — the standout capability, overriding the result:

on mench anvil prepare:
    if {_shouldOverride}:
        set mench anvil result to {_myOverleveledBook}

mench anvil result getting returns the override result if one has already been set that tick, otherwise the vanilla/core-computed result. Setting it replaces the anvil's output outright — this is the only way to influence this event, since it cannot be cancelled.


Expressions

Item Enchantment Expressions

Syntax Returns Description
mench level of %string% on %itemstack% Integer Level of a specific enchantment (by namespaced key) on an item. Returns 0 if absent. Resolves by key, so it works before the datapack is applied.
mench enchantments of %itemstack% / %itemstack%'s mench enchantments Strings All enchantment namespaced keys on an item (vanilla and custom).
mench (registered|custom) enchantments of %itemstack% / %itemstack%'s mench (registered|custom) enchantments Strings Only the MythicEnchants-registered enchantment keys on an item.
mench enchantability of %itemstack% Integer Resolved enchantability (config overrides + vanilla defaults). Returns -1 if the custom table is disabled.
mench curses of %itemstack% Strings IDs of all cursed MythicEnchants enchantments present on an item.
mench custom item id of %itemstack% String Custom-item id (MythicMobs, Nexo, ItemsAdder, CraftEngine, etc.) detected on an item, or nothing if unrecognized.
mench total [enchant[ment]] level of %string% (on|for) %livingentity% Integer Summed level of an enchantment across all of a living entity's equipped items.
mench (applicable|valid) [enchantment] definitions (for|of) %itemstack% menchenchantments All enchantment definitions that can be applied to an item.

Examples:

set {_lvl} to mench level of "mythicenchants:fire_slash" on player's tool
send "%mench enchantments of player's tool%"
send "%mench registered enchantments of player's tool%"
send "Enchantability: %mench enchantability of player's tool%"
set {_curses::*} to mench curses of {_item}
set {_id} to mench custom item id of {_item}
set {_total} to mench total level of "mythicenchants:fire_slash" on player
set {_defs::*} to all mench applicable definitions for {_item}

Definition Expressions

Syntax Returns Description
mench enchantment %string% menchenchantment Get a definition by ID (bare or namespaced).
[all] mench [enchantment] definitions menchenchantments All registered enchantment definitions.
mench (id|display name|description|rarity|min level|max level|anvil cost|supported items|namespace|key|translation key|strict mythic items) of %menchenchantment% Object Gets properties of a definition: id, display name, description, rarity, min/max level, anvil cost, supported items, namespace, key, translation key, or strict mythic items (whether application is locked to its mythic: items).
mench max level of %string% Integer Max level of an enchantment by id, without needing a resolved definition.
mench rarity of %string% String Display name of the rarity tier assigned to an enchantment id (by id, not definition).
mench conflicts of %menchenchantment% / %menchenchantment%'s mench conflicts Strings Raw conflicting enchantment/tag refs.
mench reagents of %menchenchantment% / %menchenchantment%'s mench reagents Strings Accepted reagent strings. "VANILLA" if vanilla-only, "ALL" if any.
mench (valid|enchant) slots of %menchenchantment% Strings Valid equipment slot names (e.g. MAINHAND, HEAD, or ALL).
mench tags of %menchenchantment% / %menchenchantment%'s mench tags Strings Tag IDs this enchantment belongs to.

Examples:

set {_def} to mench enchantment "fire_slash"
send "Name: %mench display name of {_def}%"
send "Rarity: %mench rarity of {_def}%"
send "Levels: %mench min level of {_def}%-%mench max level of {_def}%"
send "Tags: %mench tags of {_def}%"
send "Conflicts: %mench conflicts of {_def}%"
send "Reagents: %mench reagents of {_def}%"
send mench rarity of "mythicenchants:fire_slash"
send "%mench max level of ""mythicenchants:fire_slash""%"

loop all mench definitions:
    send "%mench id of loop-value%: %mench display name of loop-value%"

Rarity & Reagent Registry Expressions

Syntax Returns Description
[all] mench rarities Strings Display names of every registered rarity tier (built-in and custom).
[all] mench reagent keys Strings Every registered custom reagent key.
mench enchantments accepting [reagent] %string% menchenchantments Definitions that accept the given reagent key at the custom enchanting table.

Examples:

set {_rarities::*} to all mench rarities
set {_keys::*} to all mench reagent keys
set {_defs::*} to mench enchantments accepting reagent "crucible:moondust"

Tag Expressions

Syntax Returns Description
mench enchantments in tag %string% Strings All enchantment IDs that are members of a given tag.
mench (resolved|expanded) [enchantment] (ids|refs) (of|from) %strings% Strings Expands a mix of enchantment id refs and #tag refs into a flat list of fully-qualified ids.

Examples:

set {_members::*} to mench enchantments in tag "mythicenchants:celestial_pack"
send "Celestial pack has %size of {_members::*}% enchantments"
set {_ids::*} to mench resolved ids of "sharpness", "minecraft:smite" and "#celestial_pack"

Stored/Book Enchant Expressions

Syntax Returns Description
[a] mench book (with|containing) %strings% ItemStack Creates an enchanted book carrying the given enchantments. See encoding note below.
mench enchant[ment] snapshot of %itemstack% Strings Snapshot of all MythicEnchants enchantments on an item as "id:level" strings. Round-trips with mench restore enchantment snapshot.
mench stored enchantments of %itemstack% Strings All stored-enchantment IDs on an item (e.g. an enchanted book's storage meta).
mench mythic stored enchantments of %itemstack% Strings Only the MythicEnchants-registered stored-enchantment IDs on an item.
mench stored [enchant[ment]] level of %string% (on|in) %itemstack% Integer Stored enchantment level of an enchantment id on an item (e.g. a book).

"id:level" encoding convention: mench book with/containing, mench enchantment snapshot of, and mench restore enchantment snapshot (effect, below) all use a string format of "namespace:key:level" — the full enchant id (which itself contains a : for its namespace) followed by a final :level suffix. Parsing splits on the last : in the string, so "mythicenchants:fire_slash:3" is read as id mythicenchants:fire_slash at level 3.

Examples:

set {_book} to mench book with "mythicenchants:fire_slash:3"
set {_book} to mench book containing "mythicenchants:fire_slash:3" and "mythicenchants:lunar_light:2"

set {_snap::*} to mench enchantment snapshot of {_item}
mench restore enchantment snapshot {_snap::*} to {_item}

set {_stored::*} to mench stored enchantments of {_book}
set {_mythic::*} to mench mythic stored enchantments of {_book}
set {_lvl} to mench stored enchant level of "mythicenchants:fire_slash" on {_book}

Mob, Table & Seed Expressions

Syntax Returns Description
mench override (for|of) [enchant[ment]] %string% on [mob] %string% String The per-mob ApplicableEnchants override: "enabled", "disabled", or "vanilla" when none is set.
mench [table] offers (for|of) %player% Strings The enchantment ids currently offered to a player at a custom table (one per occupied slot). Empty if the table is disabled or there are no cached offers.
mench enchant seed of %player% / %player%'s mench enchant seed Integer The player's current enchanting seed (determines table offers).

Examples:

send "%mench override for enchant ""minecraft:smite"" on mob ""ZOMBIE""%"
set {_offers::*} to mench table offers for player
send "Your enchant seed: %mench enchant seed of player%"

Migration Expressions

Syntax Returns Description
mench migration target of %string% String The enchantment ID that a given (old/removed) enchantment ID is migrated to, or nothing if not migrated.

Example:

set {_target} to mench migration target of "mythicenchants:old_fire_slash"

Option Expressions (Config Options section)

Syntax Returns Description
mench raw option %string% of %string% Object Raw value from an enchantment definition's Options section by key. No type conversion or fallback. Empty if unset.
mench boolean option %string% of %string% (else|otherwise) %boolean% Boolean Boolean value from an Options section by key, falling back to a default if missing.
mench integer option %string% of %string% (else|otherwise) %integer% Integer Integer value from an Options section by key, falling back to a default if missing.
mench string option %string% of %string% (else|otherwise) %string% String String value from an Options section by key, falling back to a default if missing.

Examples:

set {_v} to mench raw option "MyCustomFlag" of "mythicenchants:fire_slash"
set {_v} to mench boolean option "MyCustomFlag" of "mythicenchants:fire_slash" else false
set {_v} to mench integer option "MyCustomCount" of "mythicenchants:fire_slash" else 0
set {_v} to mench string option "MyCustomLabel" of "mythicenchants:fire_slash" else "default"

PDC (Persistent Data Container) Expressions

Syntax Returns Description
mench pdc boolean %string% (of|on) %itemstack% (else|otherwise) %boolean% Boolean Boolean value stored in an item's PDC by key, with a fallback.
mench pdc integer %string% (of|on) %itemstack% (else|otherwise) %integer% Integer Integer value stored in an item's PDC by key, with a fallback.
mench pdc number %string% (of|on) %itemstack% (else|otherwise) %number% Number Decimal value stored in an item's PDC by key, with a fallback.
mench pdc string %string% (of|on) %itemstack% (else|otherwise) %string% String String value stored in an item's PDC by key, with a fallback.

Examples:

set {_v} to mench pdc boolean "myKey" of {_item} else false
set {_v} to mench pdc integer "myKey" of {_item} else 0
set {_v} to mench pdc number "myKey" of {_item} else 0
set {_v} to mench pdc string "myKey" of {_item} else "default"

Anvil/Grindstone Config Expressions

Syntax Returns Description
mench anvil cost multiplier Number Configured multiplier applied to anvil repair/combine costs.
mench grindstone xp return percent Integer Configured percentage of XP returned when removing enchantments at the grindstone.

Examples:

send "Cost multiplier: %mench anvil cost multiplier%"
send "XP return: %mench grindstone xp return percent%%%"

Anvil Prepare Event Expressions

Syntax Returns Description
mench anvil left [item] ItemStack The base item (anvil slot 1). Event-only (mench anvil prepare).
mench anvil right [item] ItemStack The sacrifice item (anvil slot 2). Event-only (mench anvil prepare).
mench anvil result ItemStack Gettable and settable. Getting returns the override result if set, otherwise the computed result. Setting replaces the anvil's output (e.g. to mint an "overleveled" enchanted book). Event-only (mench anvil prepare).

Examples:

set {_base} to mench anvil left item
set {_sacrifice} to mench anvil right item

on mench anvil prepare:
    if {_shouldOverride}:
        set mench anvil result to {_myOverleveledBook}

General Config Expressions

Syntax Returns Description
mench datapack name String Configured name of the MythicEnchants generated datapack.
mench language String Configured MythicEnchants language/locale code.
mench max enchantments per item Integer Configured maximum number of MythicEnchants enchantments allowed on a single item.

Examples:

send "Datapack: %mench datapack name%"
send "Language: %mench language%"
send "Max: %mench max enchantments per item%"

Apply/Remove Event Expressions

Syntax Returns Description
mench apply source String "TABLE" or "ANVIL". Event-only (mench enchantment apply).
mench remove source String "GRINDSTONE" or "ANVIL". Event-only (mench enchantment remove).
mench event slot String Equipment slot name. Event-only (mench enchantment apply or mench enchantment remove).

Examples:

if mench apply source is "TABLE":
if mench remove source is "GRINDSTONE":
if mench event slot is "HAND":

Prepare Enchant Event Expressions

Syntax Returns Description
mench table power Integer Computed table power. Event-only (mench prepare enchantment).
mench reagent key String Normalised reagent key (e.g. "minecraft:lapis_lazuli", "crucible:moondust"). Event-only (mench prepare enchantment).

Examples:

if mench table power >= 15:
if mench reagent key is "crucible:moondust":

Trigger Event Expressions (Skill Trigger & Trigger Fire)

These five expressions all work in both mench skill trigger and mench trigger fire events, except mench trigger level which is skill-trigger only.

Syntax Returns Description
mench trigger name String Trigger name (e.g. "ATTACK", "EQUIP"). Works in skill trigger and trigger fire.
mench trigger level Integer Enchantment level on the item. Skill trigger only.
mench trigger damage Number Final damage value; 0 if not a damage trigger. Works in skill trigger and trigger fire.
mench trigger item attack Number Base item attack value; 0 if not an attack trigger. Works in skill trigger and trigger fire.
mench trigger slot String Equipment slot name (e.g. "HAND", "OFF_HAND", "HEAD"). Works in skill trigger and trigger fire.

Examples:

if mench trigger name is "ATTACK":
set {_lvl} to mench trigger level
if mench trigger damage > 10:
    cancel event
set {_base_atk} to mench trigger item attack
if mench trigger slot is "HAND":

Counter Expressions

Counters are named, expiring long values scoped either to a player or to an item's persistent data.

Syntax Returns Description
mench [player] counter %string% of %player% Long Current value of a named player-scoped counter. 0 if unset/expired.
mench [item] counter %string% of %itemstack% Long Current value of a named item-scoped counter. 0 if unset/expired.

Examples:

set {_v} to mench player counter "kills" of player
set {_v} to mench item counter "uses" of {_item}

Pet Ownership Expression

Syntax Returns Description
mench pet owner of %livingentity% Player Resolved owner/rider of a companion entity (e.g. tamed pet or mount). Nothing if unresolved.

Example:

set {_owner} to mench pet owner of {_wolf}

Table Power Expressions

Direct access to the exact math the custom enchanting table uses, independent of the mench prepare enchantment event.

Syntax Returns Description
mench table power at %location% Integer Computed table power at an arbitrary location (bookshelves/state-based weight rules).
mench table slot %integer% base level (for|at|with) power %integer% Integer Base enchanting level offered for a table slot index (0-2) at a given table power.

Examples:

set {_power} to mench table power at {_tableLoc}
set {_lvl} to mench table slot 0 base level for power 15

Reagent Introspection Expressions

Syntax Returns Description
mench reagent key (for|of) %itemstack% String The reagent pool key an item resolves to (custom or vanilla:-prefixed). Nothing if it isn't a declared reagent.
mench reagent pool entries of %string% Strings Raw pool entries declared for a reagent key.

Examples:

set {_key} to mench reagent key for {_item}
set {_entries::*} to mench reagent pool entries of "my_reagent"

Table Offer Detail Expressions

Parallel arrays to mench table offers for %player% (enchantment ids) — same index maps to the same offer slot.

Syntax Returns Description
mench [table] offer costs (for|of) %player% Integers XP-level costs of a player's current table offers.
mench [table] offer levels (for|of) %player% Integers Enchantment levels of a player's current table offers.

Examples:

set {_costs::*} to mench offer costs for player
set {_levels::*} to mench offer levels for player

MythicMobs Item Bridging Expressions

Syntax Returns Description
mench mythic item type of %itemstack% String MythicMobs mythic item type ID of an item. Nothing if not a Mythic item or MythicMobs is unavailable.
mench material (for|of) [mythic] %string% Material Resolves a mythic item reference (e.g. "my_item") to its backing vanilla Material. Nothing if unresolved.

Examples:

set {_type} to mench mythic item type of {_item}
set {_mat} to mench material for mythic "my_item"

Datapack Tag Introspection Expressions

Syntax Returns Description
[all] mench known enchantable tags Strings Every datapack enchantable tag reference known to MythicEnchants.

Example:

set {_tags::*} to all mench known enchantable tags

Conditions

Item Conditions

Syntax Description
%itemstack% has mench enchant[ment] %string% Whether the item has the enchantment (by namespaced key). Supports negation (doesn't have).
%itemstack% is mench enchanted Whether the item carries at least one MythicEnchants-registered enchantment. Supports negation.
%itemstack% has [a] mench curse Whether an item has at least one cursed MythicEnchants enchantment. Supports negation.
%itemstack% is mench stored enchanted Whether an item's stored enchantments (e.g. a book) include at least one MythicEnchants-registered enchantment. Supports negation.
%itemstack% has [a] mench active enchant[ment] for trigger[s] %strings% Whether an item has a MythicEnchants enchantment active for at least one of the given trigger names. Supports negation.
%itemstack%'[s] mench enchant[ment] tooltip is hidden Whether an item's enchantment tooltip is hidden. Supports negation.
%itemstack% has mench pdc [key] %string% Whether an item has a value stored in its PDC under the given key. Supports negation.
%itemstack% mench matches %string% Whether an item matches an item reference string (vanilla material, "mythic:ID", or a custom-item integration ref). Supports negation.
%string% mench (is|can be) applied to %itemstack% Whether an enchantment id can be applied to an item (supported item types, strict mythic items, etc). Supports negation (can't be applied to).

All support negation.

Examples:

if player's tool has mench enchantment "mythicenchants:fire_slash":
if {_item} has a mench curse:
if {_book} is mench stored enchanted:
if {_item} has a mench active enchant for triggers "ATTACK" and "KILL":
if {_item}'s mench enchantment tooltip is hidden:
if {_item} has mench pdc key "myKey":
if {_item} mench matches "mythic:excalibur":
if "mythicenchants:fire_slash" mench can be applied to {_item}:

Definition Conditions

Syntax Description
%menchenchantment% is mench cursed Whether the definition is marked as a curse.
%menchenchantment% is mench treasure Whether the definition is treasure-only.
%menchenchantment% is mench tradeable Whether villagers may offer the enchantment.
%menchenchantment% is mench enabled Whether the definition is enabled.
%string% is mench registered Whether an enchantment ID exists in the registry.
%string% is mench migrated Whether an enchantment ID has a configured migration target.
%string% is [a] mench orphaned enchant[ment] Whether an enchantment ID is orphaned (no longer registered and not migrated).
%string% is [a] mench curse enchant[ment] Whether a vanilla enchantment (resolved by namespaced key) is considered a curse by MythicEnchants' anvil/grindstone logic.

All support negation (isn't mench cursed, is not mench registered, etc.).

Example:

set {_def} to mench enchantment "fire_slash"
if {_def} is mench cursed:
    send "This enchantment is a curse!"
if "fire_slash" is mench registered:
    send "Fire Slash is registered"
if "mythicenchants:old_fire_slash" is mench migrated:
    send "Migrated to %mench migration target of ""mythicenchants:old_fire_slash""%"

Apply-Result Conditions

Syntax Description
[the] last mench apply succeeded Whether the most recent mench apply effect applied the enchantment.
[the] last mench apply (failed|did(n't| not) succeed) Inverse — true when the last mench apply did not apply (unknown key, datapack not applied, or blocked by StrictMythicItems).

Check on the line right after a mench apply.

mench apply "mythicenchants:fire_slash" at level 3 to player's tool
if last mench apply succeeded:
    send "Enchanted!" to player

Tag & Conflict Conditions

Syntax Description
%string% is in mench tag %string% Whether an enchantment ID is a member of a tag. Supports negation.
%menchenchantment% mench conflicts with %menchenchantment% Whether two definitions conflict (checks both directions, resolves tag refs). Supports negation (doesn't mench conflict with).

Example:

if "mythicenchants:fire_slash" is in mench tag "mythicenchants:celestial_pack":
    send "Fire Slash is in the Celestial Pack!"

set {_a} to mench enchantment "fire_slash"
set {_b} to mench enchantment "ice_blade"
if {_a} mench conflicts with {_b}:
    send "These enchantments conflict!"

Mob Conditions

Syntax Description
%string% has mench [mob] overrides Whether a MythicMobs mob id has any per-mob enchant applicability overrides configured. Supports negation.

Example:

if "ZOMBIE" has mench overrides:
    send "This mob has custom enchant applicability rules."

Config/Feature-Flag Conditions

These all check a live config value and support negation.

Syntax Description
mench custom [enchanting] table is enabled Whether the custom enchanting table feature is enabled.
mench datapack is enabled Whether the datapack integration is enabled.
mench datapack auto-generates Whether the datapack is configured to auto-generate.
mench debug(ging)? is enabled Whether debug logging is enabled.
mench checks? for updates Whether MythicEnchants checks for updates.
mench cleanup is enabled Whether cleanup of disabled/orphaned enchantments is enabled.
mench cleanup is silent Whether cleanup runs silently.
mench has migrations Whether any enchantment migrations are configured.
mench treasure is allowed at [the] table Whether treasure-only enchantments can appear at the enchanting table.
mench vanilla is in [the] table Whether vanilla enchantments can appear alongside MythicEnchants ones at the table.
mench anvil combining is allowed Whether combining MythicEnchants enchantments at the anvil is allowed.
mench anvil use is free Whether anvil use is configured to be free (no XP/item levy cost).
mench anvil bypass[es] too expensive Whether the anvil bypasses vanilla's "too expensive" repair cost cap.
mench anvil supported items (is|are) enforced Whether the anvil enforces an enchantment's SupportedItems restriction.
mench anvil shows cost when unaffordable Whether the anvil shows repair cost even when the player can't afford the combine.
mench grindstone removal is allowed Whether removing MythicEnchants enchantments at the grindstone is allowed.
mench grindstone keeps curses Whether the grindstone keeps curse enchantments instead of removing them.

Examples:

if mench custom table is enabled:
if mench datapack auto-generates:
if mench debugging is enabled:
if mench checks for updates:
if mench cleanup is enabled:
if mench cleanup is silent:
if mench has migrations:
if mench treasure is allowed at the table:
if mench vanilla is in the table:
if mench anvil combining is allowed:
if mench anvil use is free:
if mench anvil bypasses too expensive:
if mench anvil supported items are enforced:
if mench anvil shows cost when unaffordable:
if mench grindstone removal is allowed:
if mench grindstone keeps curses:

Counter Condition

Syntax Description
mench [player] counter %string% of %player% matches %string% Whether a player counter's current value matches a range expression: "5", ">4", ">=5", "<10", "<=9", "5-10", or "5to10". Supports negation (doesn't match). Only a player-scoped form is provided — read an item counter first with the expression above if you need to range-check it.

Example:

if mench player counter "kills" of player matches ">=10":
    send "Double digits!" to player

Pet Ownership Condition

Syntax Description
%player% is [the] mench pet owner of %livingentity% Whether a player is the resolved owner/rider of a companion entity. Supports negation.

Example:

if player is the mench pet owner of {_wolf}:
    send "That's your pet!" to player

Reagent Condition

Syntax Description
%string% is [a] mench declared reagent Whether a reagent key is declared in the reagent registry. Supports negation.

Example:

if "my_reagent" is a mench declared reagent:

Vanilla Curse Flag Conditions

Vanilla Minecraft's Curse of Binding and Curse of Vanishing, tracked separately from MythicEnchants' own Cursed: option system used by custom enchantments.

Syntax Description
%itemstack% has [a] mench vanilla binding curse Whether an item has vanilla Curse of Binding. Supports negation.
%itemstack% has [a] mench vanilla vanishing curse Whether an item has vanilla Curse of Vanishing. Supports negation.

Example:

if {_item} has a mench vanilla binding curse:

Datapack Tag Introspection Condition

Syntax Description
%string% is [a] mench known enchantable tag Whether a datapack tag reference is a known enchantable tag. Supports negation.

Example:

if "#minecraft:enchantable/sword" is a mench known enchantable tag:

Effects

Enchantment Effects

Syntax Description
mench apply %string% at level %integer% to %itemstack% Applies an enchantment by namespaced key to an item. Bypasses level limits. Requires the enchantment to exist in the registry (datapack applied). Can fail silently — check last mench apply succeeded after.
mench apply %string% at level %integer% to %itemstack% for %player% and fire trigger Same as above, but also dispatches the ENCHANT_APPLY skill trigger for that player, exactly as if applied through the anvil or table — use this when a scripted apply should trigger the enchant's own on-apply skills.
mench remove %string% from %itemstack% Removes an enchantment by namespaced key from an item. Resolves by key, so it works before the datapack is applied.
mench copy enchant[ment]s from %itemstack% to %itemstack% Copies all MythicEnchants enchantments from one item onto another.
unregister mench enchant[ment] %string% Removes a definition from the registry by id (deindexes tags, reagents, triggers). Does not alter the generated datapack until the next boot.

Examples:

mench apply "mythicenchants:fire_slash" at level 3 to player's tool
if last mench apply failed:
    send "That enchantment can't go on this item." to player
mench apply "mythicenchants:fire_slash" at level 3 to player's tool for player and fire trigger
mench remove "mythicenchants:fire_slash" from player's tool
mench copy enchantments from {_oldItem} to {_newItem}
unregister mench enchantment "yourplugin:starfall"

Registering new definitions is a Java-API operation (MythicEnchantsAPI.register(...) with the EnchantmentDefinition.builder), not a Skript effect — brand-new enchantments require a server restart to enter the datapack/Registry.ENCHANTMENT, so runtime script-side creation has limited use. See docs/API.md.


Stored/Book Enchant Effects

Syntax Description
mench restore enchant[ment] snapshot %strings% to %itemstack% Restores a list of "id:level" strings (as produced by mench enchantment snapshot of) onto an item. See the encoding note in the Expressions section above.

Example:

set {_snap::*} to mench enchantment snapshot of {_item}
# ... later ...
mench restore enchantment snapshot {_snap::*} to {_item}

PDC Effects

Syntax Description
mench set pdc boolean %string% (of|on) %itemstack% to %boolean% Sets a raw boolean value in an item's PDC by key.
mench set pdc integer %string% (of|on) %itemstack% to %integer% Sets a raw integer value in an item's PDC by key.
mench set pdc number %string% (of|on) %itemstack% to %number% Sets a raw decimal value in an item's PDC by key.
mench set pdc string %string% (of|on) %itemstack% to %string% Sets a raw string value in an item's PDC by key.
mench remove pdc [key] %string% (from|of) %itemstack% Removes a value stored in an item's PDC by key.

Examples:

mench set pdc boolean "myKey" of {_item} to true
mench set pdc integer "myKey" of {_item} to 5
mench set pdc number "myKey" of {_item} to 3.5
mench set pdc string "myKey" of {_item} to "myValue"
mench remove pdc key "myKey" from {_item}

Tooltip Effects

Syntax Description
mench hide [the] enchant[ment] tooltip (of|on) %itemstack% Hides the enchantment tooltip on an item.
mench show [the] enchant[ment] tooltip (of|on) %itemstack% Shows the enchantment tooltip on an item.

Example:

mench hide the enchantment tooltip of {_item}
mench show the enchantment tooltip on {_item}

Seed Effects

Syntax Description
mench reroll [enchant] seed of %player% Rerolls the player's enchanting seed (changes table offers).
mench reroll %player%'[s] [enchant] seed Alternative form.

Example:

mench reroll enchant seed of player
send "Your enchanting table offers have been refreshed!"

Trigger Subscription Effects

Syntax Description
mench subscribe to trigger %string% Subscribes to a named MythicEnchants/MythicMobs trigger so that mench trigger fire events fire for it, even for items with no matching enchantment.
mench unsubscribe from trigger %string% Unsubscribes from a named trigger, stopping mench trigger fire events for it (unless another subscriber still needs it).

Example:

mench subscribe to trigger "BLOCK_BREAK"
# ... later ...
mench unsubscribe from trigger "BLOCK_BREAK"

Debug/Maintenance Effects

Syntax Description
mench enable debug[ging] Enables MythicEnchants debug logging at runtime.
mench disable debug[ging] Disables MythicEnchants debug logging at runtime.
regenerate mench datapack Regenerates and re-installs the MythicEnchants datapack from the currently loaded enchantment definitions. Newly added enchantments still require a server restart to be usable — this only refreshes the datapack payload.
reload mench enchant[ment] files Reloads all enchantment definition YAML files from disk, re-indexing the registry, tags, and reagents.

Examples:

mench enable debugging
mench disable debug
regenerate mench datapack
reload mench enchantment files

Counter Effects

Syntax Description
mench add %integer% to [player] counter %string% of %player% [expiring in %string%] Adds a delta to a player counter. Duration string accepts "5t" (ticks), "5s" (seconds), "-1"/"never"/"forever" (no expiry). Omitting the expiry clause never expires the counter.
mench set [player] counter %string% of %player% to %integer% [expiring in %string%] Sets a player counter to an exact value, with the same optional expiry.
mench remove [player] counter %string% (from|of) %player% Removes a player counter entirely.
mench add %integer% to item counter %string% of %itemstack% [expiring in %string%] Adds a delta to an item counter (persisted onto the item).
mench set item counter %string% of %itemstack% to %integer% [expiring in %string%] Sets an item counter to an exact value (persisted onto the item).
mench remove item counter %string% (from|of) %itemstack% Removes an item counter entirely.

Examples:

mench add 1 to player counter "kills" of player
mench add 1 to player counter "combo" of player expiring in "5s"
mench set player counter "kills" of player to 0
mench remove player counter "combo" from player

mench add 1 to item counter "uses" of {_item}
mench set item counter "streak" of {_item} to 3 expiring in "10s"
mench remove item counter "streak" from {_item}

Table Offer Effect

Syntax Description
mench invalidate [table] offers (for|of) %player% Invalidates the cached table offers for a player, forcing recomputation next time the table opens.

Example:

mench invalidate table offers for player

Vanilla Curse Flag Effects

Syntax Description
mench (add|remove) [a] vanilla binding curse (to|from) %itemstack% Adds or removes vanilla Curse of Binding on an item.
mench (add|remove) [a] vanilla vanishing curse (to|from) %itemstack% Adds or removes vanilla Curse of Vanishing on an item.

Examples:

mench add a vanilla binding curse to {_item}
mench remove a vanilla vanishing curse from {_item}

Cancel Event

Of the six MythicEnchants events, four support Skript's native cancel event:

on mythic enchantment skill trigger:
    if mench trigger name is "ATTACK":
        if player is in world "spawn":
            cancel event  # suppress enchantment skills in spawn
  • Apply/Remove events: cancelling suppresses MythicEnchants' skill dispatch for that trigger, but does NOT revert the underlying Bukkit operation.
  • Skill trigger event: cancelling skips the skill call for that specific enchantment only.
  • Prepare enchant event: cancelling leaves the vanilla offers untouched.
  • Trigger fire event: NOT cancellable — this is a pure notification bridge, there is no vanilla operation to suppress.
  • Anvil prepare event: NOT cancellable — instead, "override" its outcome with set mench anvil result to ....

Full Example Script

on mythic enchantment skill trigger:
    # Suppress all enchant skills in the spawn world
    if player is in world "spawn":
        cancel event
        stop

    # Log high-damage enchantment hits
    if mench trigger name is "ATTACK":
        if mench trigger damage > 15:
            log "%player% dealt %mench trigger damage% damage with %mench id of event-menchenchantment% level %mench trigger level%"

on mythic enchantment apply:
    # Announce rare enchantment applications
    set {_def} to mench enchantment "mythicenchants:legendary_strike"
    if {_def} is set:
        if mench apply source is "TABLE":
            broadcast "&6%player% just enchanted their %event-item% with Legendary Strike!"

on mythic prepare enchantment:
    # Show reagent info
    if mench reagent key is not "minecraft:lapis_lazuli":
        send "&dSpecial reagent: %mench reagent key% (Power: %mench table power%)" to player

# Subscribe to a trigger that has no matching enchantment requirement
mench subscribe to trigger "BLOCK_BREAK"

on mench trigger fire:
    if mench trigger name is "BLOCK_BREAK":
        send "&7Trigger fired on %event-item%." to player

# Honor "overleveled" enchanted books past vanilla's level clamp at the anvil
on mench anvil prepare:
    set {_left} to mench anvil left item
    set {_right} to mench anvil right item
    if {_right} is not set:
        stop
    set {_bookLevel} to mench stored enchant level of "mythicenchants:fire_slash" in {_right}
    if {_bookLevel} > mench max level of "mythicenchants:fire_slash":
        # Vanilla would clamp this combine — build our own overleveled result instead.
        set {_snap::*} to mench enchantment snapshot of {_left}
        set {_result} to mench anvil result
        mench restore enchantment snapshot {_snap::*} to {_result}
        mench apply "mythicenchants:fire_slash" at level {_bookLevel} to {_result}
        set mench anvil result to {_result}

# Curses, options, PDC helpers, and tooltip hiding on a crafted "cursed relic"
command /makerelic:
    permission: mench.relic
    trigger:
        set {_relic} to mench book with "mythicenchants:doom_curse:1"
        mench set pdc string "relic_owner" of {_relic} to "%player%"
        mench set pdc boolean "relic_bound" of {_relic} to true
        mench hide the enchantment tooltip of {_relic}
        give {_relic} to player
        if {_relic} has a mench curse:
            send "&4Beware — this relic is cursed!" to player

# Command to inspect an enchantment
command /enchinfo <text>:
    permission: mench.info
    trigger:
        if arg-1 is not mench registered:
            send "&cEnchantment not found."
            stop
        set {_def} to mench enchantment arg-1
        send "&aEnchantment: &f%mench display name of {_def}%"
        send "&aID: &f%mench id of {_def}%"
        send "&aRarity: &f%mench rarity of {_def}%"
        send "&aLevels: &f%mench min level of {_def}%&7-&f%mench max level of {_def}%"
        send "&aTags: &f%mench tags of {_def}%"
        send "&aConflicts: &f%mench conflicts of {_def}%"
        send "&aReagents: &f%mench reagents of {_def}%"
        if {_def} is mench cursed:
            send "&c(Curse)"
        if {_def} is mench treasure:
            send "&e(Treasure)"
Updated Aug 19, 2026