HomeJavaModsAntiEnchants - Keep your SMP balanced!
AntiEnchants - Keep your SMP balanced!
ModsJava

AntiEnchants - Keep your SMP balanced!

⬇ Download on Spigot
AntiEnchants
Ban, cap and control enchantments — server-wide.

Born as AntiMending, now a general-purpose enchantment control plugin: decide which enchantments exist on your server, at which level, on which items, in which worlds — and who is allowed to skip the rules.

Features

Commands (permission antienchants.admin, alias /ae)

Configuration
Every feature can be toggled. Updating the jar adds new options to your config automatically — your edited values are never touched, and old configs keep working without regeneration.

Spoiler: Full config.yml (default)
Code (YAML):

# DRY-RUN mode: when true, AntiEnchants only LOGS what it would do (console,
# plus strips.log when the audit log is enabled) and never modifies a single
# item. Turn it on to preview the impact of new rules on a live server, adjust
# them with /antienchants add|remove|cap, then set it back to false — and run
# /antienchants purge all to apply the cleanup in one go.
dry-run
: false

# Banned enchantments: removed from ANY item (inventories, picked-up items,
# fishing, loot, mob drops) so they can never exist on the server.
banned-enchantments
:
  enabled
: true

  # Keys to block. 'mending' = minecraft:mending. Full keys (namespace:key) are
  # accepted too, including keys from other plugins (e.g. ecoenchants:telekinesis).
  keys
:
   - mending

  # Block ALL curses (vanishing_curse, binding_curse and any plugin curse)
  # without listing them one by one.
  ban-all-curses
: false

  # Item types that are NEVER touched (no strip, no level cap). Material names,
  # '*' wildcards allowed. Example: [ "*_SWORD", "*_AXE", "BOW", "TRIDENT" ]
  exempt-items
: [ ]

  # When a stripped enchanted book ends up with no enchantments left, convert it
  # into a normal book instead of leaving a useless empty enchanted book behind.
  convert-empty-books
: true

  # Purge the player's inventory on join / inventory open / click.
  purge-player-inventories
: true

  # Block PlayerItemMendEvent: XP never repairs durability (mending's effect),
  # even if an item slips through with the enchantment.
  block-xp-repair
: true

  # Clean items when picked up off the ground.
  strip-on-pickup
: true

  # Clean fished items.
  strip-on-fish
: true

  # Clean generated loot (structure chests, loot-table fishing, etc.).
  strip-from-loot
: true

  # Clean enchanted gear dropped by mobs on death.
  strip-mob-drops
: true

  # Remove banned enchantments (and apply level caps) at the source: the
  # enchanting table result and the anvil/grindstone/smithing-table result
  # previews (the smithing case covers netherite upgrades, which carry every
  # enchantment onto the upgraded item).
  block-at-table
: true
  block-at-anvil
: true
  block-at-grindstone
: true
  block-at-smithing
: true

# Level caps: instead of banning outright, cap an enchantment at a maximum
# level — anything above is automatically reduced (e.g. with 'sharpness: 3',
# a Sharpness V sword becomes Sharpness III). Same key format as
# banned-enchantments.keys.
# Example:
#   sharpness: 3
#   protection: 2
level-caps
: { }

# Per-world EXTRA rules, merged ON TOP of the global ones. Worlds not listed
# here use the global rules only. Useful for resource/mining worlds.
# Example:
#   world_resource:
#     keys:               # banned in that world, in addition to the global list
#       - fortune
#     level-caps:         # caps in that world (add to or override the global ones)
#       efficiency: 4
per-world
: { }

# Compensation: when a banned enchantment is stripped from a player's item,
# give something back so rare loot doesn't feel wasted. Entries are
# "MATERIAL:amount", granted once per stripped enchantment.
# Only player-context strips compensate (inventory purge, pickup, fishing) and
# never in creative mode; loot/mob-drop strips never do.
compensation
:
  enabled
: false
  # Used unless the enchantment has an override below.
  default
:
   - "EXPERIENCE_BOTTLE:4"
  # Per-enchantment overrides. Example:
  #   mending:
  #     - "EMERALD:8"
  per-enchant
: { }

# Permission bypass: players with 'antienchants.bypass.<key>' keep and use that
# enchantment (e.g. antienchants.bypass.mending, or
# antienchants.bypass.ecoenchants.telekinesis for other namespaces).
# 'antienchants.bypass.*' bypasses everything. All nodes are registered with
# default FALSE, so ops do NOT bypass by accident.
permission-bypass
:
  enabled
: true

# Player feedback when their items are adjusted (MiniMessage format;
# empty string = silent). {count} = number of enchantments affected.
messages
:
  stripped
: "<red>{count} banned enchantment(s) were removed from your items."
  capped
: "<yellow>{count} enchantment(s) were reduced to the allowed level."
  compensated
: "<green>You received compensation for the removed enchantment(s)."

# Audit log: appends every player-context strip/cap to
# plugins/AntiEnchants/strips.log (when, who, where, what was removed).
audit-log
:
  enabled
: false
  # Rotate to strips.log.1 when the file exceeds this size (KB). 0 = never rotate.
  max-file-kb
: 2048

# Villager trade control. Cancelling on acquire prevents the recipe from ever
# being added to the villager.
villager-trades
:
  enabled
: true

  # Villagers won't acquire ANY trade whose result is a book (book, enchanted
  # book, writable/written book, knowledge book).
  block-book-trades
: true

  # Villagers won't acquire trades whose result carries a banned or over-cap
  # enchantment (covers non-book results too).
  block-banned-enchant-trades
: true

# Worlds where nothing is applied (list of names). Empty = applied everywhere.
disabled-worlds
: [ ]
 

Servers using AntiEnchants
[​IMG]
Anonymous stats via bStats — opt-out in plugins/bStats/config.yml.

Requirements
Paper (or fork) 1.21+. No dependencies.

Suggestions and bug reports are welcome in the discussion thread.

Commands

Plugin details

Read from the plugin's own plugin.yml.

Quick facts

Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.

AntiEnchants - Keep your SMP balanced! is a free Minecraft Java mod. Compatible with Minecraft 1.21, 26.1. Downloaded 113 times (via Spigot). Download it and open it directly in the game.

Explore more