Skip to content

Examples

neoramm edited this page Nov 5, 2026 · 1 revision

Examples

Complete enchantments you can drop in the enchants folder (and a restart). Each file name below is the id of the enchantment.

A sword that sets enemies on fire

enchants/blazing.yml

name: "Blazing"
description:
  - "<gray>Sometimes sets enemies on fire."
rarity: rare
max-level: 3
supported-items: ["#minecraft:swords"]
slots: [mainhand]
incompatible: ["minecraft:fire_aspect"]
triggers:
  ignite:
    on: attack
    if:
      - chance: "{level} * 15%"
    do:
      - ignite: 4s
      - particle: FLAME 10 0.3

The chance grows with the level (15%, 30%, 45%). ignite affects the target of the hit, because attack has one. The fire always lasts 4 seconds; write ignite: "{level} * 2" to make it last 2 seconds per level instead.

Armor that heals you when you are hit

enchants/resilience.yml

name: "Resilience"
description:
  - "<gray>When you are hit, you may heal a bit."
rarity: uncommon
max-level: 4
supported-items: ["#minecraft:enchantable/chest_armor"]
slots: [chest]
triggers:
  recover:
    on: defend
    if:
      - chance: "{level} * 10%"
    do:
      - heal:
          amount: "{level}"
          entity: "{player}"
      - particle: HEART 3 0.3
    cooldown: 3s

Boots that make you jump higher

enchants/spring.yml

name: "Spring"
description:
  - "<gray>Jump boost while you wear the boots."
rarity: uncommon
max-level: 3
supported-items: ["#minecraft:enchantable/foot_armor"]
slots: [feet]
triggers:
  jump:
    on: passive
    do:
      - effect:
          type: JUMP_BOOST
          duration: 3s
          level: "{level}"
          particles: false
          entity: "{player}"

A helmet that feeds you slowly

name: "Gourmet"
description:
  - "<gray>Keeps your hunger bar up."
rarity: rare
max-level: 2
supported-items: ["#minecraft:enchantable/head_armor"]
slots: [head]
triggers:
  nibble:
    on: passive
    if:
      - food: "< 18"
    do:
      - feed: "{level}"

The passive event runs every second, so a level 2 helmet adds 2 hunger points per second while the player's hunger is below 18.

A pickaxe that repairs itself

enchants/self-repair.yml

name: "Self-Repair"
description:
  - "<gray>Mining slowly repairs the pickaxe."
rarity: legendary
max-level: 3
treasure: true
supported-items: ["#minecraft:pickaxes"]
slots: [mainhand]
incompatible: ["minecraft:mending"]
triggers:
  mend:
    on: block-break
    if:
      - chance: 40%
    do:
      - repair-item:
          amount: "{level} * 2"
          slot: mainhand

A bow that sets a trap

name: "Frozen Arrow"
description:
  - "<gray>Arrows slow down what they hit."
rarity: rare
max-level: 3
supported-items: ["#minecraft:enchantable/bow"]
slots: [hand]
triggers:
  chill:
    on: bow-hit
    do:
      - effect:
          type: SLOWNESS
          duration: 4s
          level: "{level}"
          entity: "{target}"

bow-hit takes the level from the bow that was used to shoot. The level of the effect grows with the enchantment. The duration could grow too, with a calculation in seconds like duration: "2 + {level}".

A bow that wears out faster

name: "Heavy Draw"
description:
  - "<gray>Every shot wears the bow down."
rarity: common
max-level: 1
curse: true
supported-items: ["#minecraft:enchantable/bow"]
slots: [mainhand]
triggers:
  strain:
    on: shoot
    do:
      - damage-item:
          amount: 2
          slot: mainhand

A set bonus with two enchantments

An enchantment on the chestplate that gives extra only if the helmet has another enchantment too. This example needs the gourmet enchantment from the example above to exist.

name: "Guardian"
description:
  - "<gray>Stronger together with Gourmet on the helmet."
rarity: epic
max-level: 3
supported-items: ["#minecraft:enchantable/chest_armor"]
slots: [chest]
triggers:
  bonus:
    on: defend
    if:
      - has-enchant:
          enchant: gourmet
          slot: head
    do:
      - set-damage: "{damage} * max(0.4, 1 - 0.15 * {level})"

Capping the effect for very high levels

Plan for levels above the maximum with a cap:

name: "Overcharge"
description:
  - "<gray>More damage with every level, up to a limit."
rarity: legendary
max-level: 5
supported-items: ["#minecraft:swords"]
slots: [mainhand]
triggers:
  charge:
    on: attack
    do:
      - set-damage: "{damage} + min({level}, 20)"

At level 5 it adds 5; at level 50 (created with /forceenchant) it adds at most 20.

Clone this wiki locally