AntiEnchants - Keep your SMP balanced! icon

AntiEnchants - Keep your SMP balanced! -----

Stop enchants like mending from breaking your server's economy and progression.



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
  • Ban any enchantment (default: mending). Removed from player inventories, pickups, fishing, chest loot and mob drops — it can't exist on your server.
  • Level caps — don't ban it, cap it. sharpness: 3 reduces every Sharpness IV/V to III automatically.
  • Item whitelist — exempt item types from all checks, with wildcards: exempt-items: [ "*_SWORD", "BOW" ]
  • Compensation (optional) — when an enchantment is stripped, the player gets something back (XP bottles, emeralds, anything), per enchantment or globally.
  • Permission bypassesantienchants.bypass.mending for donor ranks, staff or quest winners. antienchants.bypass.* for everything. Nodes default to FALSE, so ops never bypass by accident.
  • Per-world rules — ban fortune only in your resource world, cap efficiency only in the mining world. Plus disabled-worlds to turn the plugin off entirely somewhere.
  • Blocks at the source — enchanting table results and anvil/grindstone/smithing-table previews are cleaned before the player pays (netherite upgrades carry enchantments — covered).
  • Blocks mending's effect — XP never repairs durability, even if an item slips through.
  • Cursesban-all-curses: true blocks every curse at once (vanilla + other plugins).
  • Villager control — stop librarians from selling enchanted books (or any book), and any trade carrying a banned/over-cap enchantment.
  • Player feedback — configurable MiniMessage messages when items are stripped, capped or compensated. Empty = silent.
  • Audit log (optional) — every strip goes to strips.log: when, who, where, what.
  • Dry-run mode (optional) — dry-run: true and the plugin only LOGS what it would strip or cap, without touching a single item. Preview the impact of new rules on a live server before enforcing them.
  • On-demand purge/ae purge all cleans every online inventory the moment you change the rules, instead of waiting for each player's next join.
  • Other plugins' enchantments — keys accept any namespace (ecoenchants:telekinesis).

Commands (permission antienchants.admin, alias /ae)
  • /ae reload — reload the config, no restart.
  • /ae list — what's banned and capped right now.
  • /ae check [player] — inspect the item in your hand, or every slot of another player's inventory (works from console).
  • /ae add <enchant> / /ae remove <enchant> — edit the banlist live (saved to config).
  • /ae cap <enchant> <level|off> — set or clear a level cap live.
  • /ae purge <player|all> — clean online inventories on demand (reports instead of cleaning while dry-run is on).

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.

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.
Resource Information
Author:
----------
Total Downloads: 45
First Release: May 4, 2026
Last Update: Jun 12, 2026
Category: ---------------
All-Time Rating:
2 ratings
Version -----
Released: --------------------
Downloads: ------
Version Rating:
----------------------
-- ratings