Better Enchant Commands

Better enchant commands to enhance your creative gameplay when utilizing /enchants and /give.

by
385 Downloads
fabricequipmentgame-mechanicsoptimization
Rent Server with this Mod

About this Mod

Better Enchant Commands

Override /enchant, /give, and friends with extended enchantment levels, simplified syntax, presets, and an audited confirmation/undo workflow for Minecraft 1.21.x.

Vanilla /enchant refuses non-integer levels and caps out where the enchantment says so. Vanilla /give needs verbose component syntax for enchanted items. Better Enchant Commands replaces the two core commands and adds a handful of workflow helpers, all gated behind op level 2 and backed by a structured audit log.

Features

/enchant — enchant beyond vanilla limits

Drop-in replacement for vanilla /enchant. Apply any enchantment to the item in a player's hand at levels 1–255.

  • /enchant @s minecraft:sharpness 255
  • /enchant aGamingGod minecraft:protection 10
  • /enchant list

/enchant list prints the enchantments on the held item of the player running the command.

/give — inline enchantment syntax

Drop-in replacement for vanilla /give. Works exactly like normal when used without enchantments. Append an optional enchantments: block for instant enchanted items:

  • /give @s minecraft:netherite_chestplate enchantments:protection:10,unbreaking:3
  • /give @s minecraft:diamond_sword 1 enchantments:sharpness:255,fire_aspect:5,looting:10

The minecraft: namespace is optional — sharpness:255 works. No JSON, no brackets, no quotes. Tab completion filters candidates to enchantments actually compatible with the chosen item.

/enchantpreset — save and replay enchantment bundles

  • /enchantpreset save <name> — save currently-held item's enchantments
  • /enchantpreset apply <name> <targets>
  • /enchantpreset delete <name>
  • /enchantpreset list

Names are validated (1–64 chars, A–Z, a–z, 0–9, _, -). Skipped empty-hand targets are reported in the output.

/unenchant, /enchantinfo, /enchantlist

Cleanup and inspection helpers:

  • /unenchant <targets> — strip all enchantments
  • /unenchant <targets> <enchantment> — strip one
  • /enchantinfo — full detail on held item
  • /enchantlist [filter] — registry listing, optionally filtered

/repair — mended gear in one command

Hands out a copy of any item with Mending (and Unbreaking III where compatible) pre-applied. The reflective compat lookup is cached per session so repeat invocations are fast.

/enchants — bulk operations, undo, and config

  • /enchants undo — restore your last bulk modification
  • /enchants confirm <token> — complete a gated bulk operation
  • /enchants status
  • /enchants allow_all_enchantments true|false

Operations over confirmation_threshold targets require a short-lived token — no more accidental "enchanted the entire server" incidents. Undo is a bounded per-operator deque (default 8 entries).

Design highlights

  • Fail-safe validation. Enchantment strings parse into fully-validated (Identifier, level) pairs before any item is touched. Parse failures leave items unmodified.
  • Structured audit log. Every privileged action is emitted to a dedicated SLF4J [AUDIT] logger with sanitised operator, target, and label fields — safe to route to a log-aggregation pipeline.
  • Log-injection hardened. Any string originating from player input is stripped of ASCII control characters before being formatted into log lines, so a crafted scoreboard name can't forge or break audit entries.
  • Bounded bulk modifications. Commands that affect more targets than confirmation_threshold require a token-based confirmation round-trip.
  • Reflective compatibility layer. Permission checks, registry lookups, and component reads resolve via method-shape heuristics cached per class, so the same jar runs across all 1.21.x minor versions without recompilation.
  • Zero mixins. Pure Fabric API command registration — maximum compatibility with other mods.
  • Server-side only. Clients don't need the mod installed.

Why Better Enchant Commands?

  • Drop-in replacements. Overrides vanilla /enchant and /give directly; no new commands to memorise for the core workflow.
  • Fully backward compatible. /give @s diamond 64 still works exactly like vanilla.
  • Lightweight. ~105 KB, server-side only, no tick hooks, no mixins.
  • Crash-proof. Every code path is defensively wrapped; malformed input gives helpful error messages, never a server crash.
  • Cross-version. Built against 1.21 base — works on every 1.21.x subversion without recompilation.
  • Preset-driven workflow. Save standard loadouts once; apply them to any number of players with one command.
  • Audit trail. Operators can be held accountable for what they enchanted, for whom, and when.

Requirements

  • Minecraft 1.21.x (any subversion)
  • Fabric Loader 0.16.0+
  • Fabric API

Permissions

All commands require operator level 2, matching vanilla /enchant and /give.

Technical notes

Better Enchant Commands writes directly to the DataComponents.ENCHANTMENTS component on item stacks, bypassing vanilla's level validation but enforcing its own bounds (1–255). Enchantments are stored exactly like vanilla ones — no custom data, no compatibility issues with other mods reading your items.

Available Versions

Better Enchant Commands 1.1.0release
MC 1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.7, 1.21.8, 1.21.9, 1.21.10, 1.21.11fabric
April 16, 2026

How to Install Better Enchant Commands on Your Server

1

Order Server

Order a Minecraft Java server with at least 3 GB RAM (4 GB recommended).

2

Set fabric Loader

In the panel under "Egg", select the fabric loader and matching Minecraft version (1.21.11).

3

Install Mod

Open the mod browser in the dashboard and search for "Better Enchant Commands". Click "Install" – done! Alternatively, upload the .jar via SFTP to the /mods folder.

Compatibility

Mod Loaders

fabric

Minecraft Versions

1.21.11, 1.21.10, 1.21.9 (+9 more)

Server-side

Required

Recommended RAM

4 GB(min. 3 GB)

Frequently Asked Questions

Better Enchant Commands server crashes on startup – what to do?

Most common cause: wrong fabric version or insufficient RAM. Check the server log (latest.log) for "OutOfMemoryError" or "Mixin" errors. With Mado Hosting: ensure at least 3 GB RAM is allocated and the loader matches the mod version (1.21.11). You can switch loaders with one click in the panel.

Is Better Enchant Commands compatible with fabric?

Better Enchant Commands officially supports fabric for Minecraft 1.21.11, 1.21.10, 1.21.9. The Mado dashboard automatically detects incompatible loader combinations.

Server lagging with Better Enchant Commands – how to optimize performance?

Recommended RAM: 4 GB (per 8 players). Use /spark profiler to check if Better Enchant Commands consumes the most tick time. Common fixes: reduce server view-distance to 8-10, install "performant" or "starlight" as supplementary mods on Forge. With Mado Hosting, your server runs on NVMe SSDs with dedicated CPU cores for minimal latency.

Rent Modded Server

Install Better Enchant Commands with just one click on your server.

Recommended RAM
4 GBab €8/mo
Min. 3 GB | +1 GB pro 8 Spieler
Create Server Now
1-Click Mod Install
NVMe SSD Storage
DDoS Protection included

Details

License
MIT License
Server-side
Required

Supported Versions

1.21.111.21.101.21.91.21.81.21.71.21.61.21.51.21.41.21.31.21.2+2 more