Enchantment Limiter 1.6.1


  • Filename
  • Uploaded by
  • Uploaded
    Jul 18, 2015
  • Size
    34.64 KB
  • Downloads
  • MD5

Supported Bukkit Versions

  • CB 1.7.9-R0.2
  • CB 1.7.2-R0.3
  • CB 1.6.4-R2.0



  • Fixed: made Stop repairs and Stop all repairs catch repairs using raw materials. Ticket 7]


  • Fixed: wasn't supporting ALL_BARDING properly
  • Added: new config item Stop all repairs and associated permission allrepairs

1.5.4: yes, went through three test versions until release

  • Fixed: Hotbar duplication bugs in Anvil Ticket 3.
  • Added:
    • Apply_on_global_check: new config node that allows referring to Disallowed anvil and/or table lists during item spawn, player pickup, or player hold events, respectively controlled by Fix spawned items, Stop pickup, Fix held items
      • three subsidiary items control these
      • Apply_on_global_check.anvil: if true, then Disallowed anvil enchants will also be checked during those events. Default is false
      • Apply_on_global_check.table: if true, then Disallowed table enchants will also be checked during those events. Default is false
      • both of above can be true, if desired.
      • Apply_on_global_check.restrictive: if true, the highest possible level will be used in case of conflict between Disalllowed enhants and the others. If false, the lowest enchant level will be used. Default is true.
    • New feature to control armor use during equippage
      • if Fix held items is true, "fix" illegal armor as it is equipped normally.
      • if false, equip event will be cancelled with Message on cancel hold to player
      • also applies when user equips/receives armor from a dispenser (must be immediately in front of it)
    • Related new feature, if Fix held items is false, to cancel using an illegal item when held
      • works for weapons, tools, and armor. Latter cancels right-click to equip armor
      • new permission enchlimiter.useillegal if true, overrides this effect.
        • default is Op only.
      • Note: there is a Bukkit bug that can lose the "hold event" sometimes, so the new default value is true; otherwise, user can spam the button until they are able to use the illegal item.
    • New Downgrade in anvil, if true, allows using illegal items in anvil by downgrading the result
      • if detected when placing an item, warnings will be posted to user with new "Warn" messages
      • if detected when taking result, action will be permitted but result will be downgraded
      • Default is false.
      • If false, Stop repairs still applies.
    • New command options for el set
      • Added new option to set message
        • message hold true enables Message on cancel hold
      • new set global options with three possibilities:
        • set global table true|false will set Apply_on_global_check.table
        • set global anvil true|false will set Apply_on_global_check.anvil
        • set global restrictive true|false will set Apply_on_global_check.restrictive
  • Changed:
    • New default for Fix held items is true; see above Note.
    • Removed Downgrade repairs in favor of new Downgrade in anvil
      • Command el set downgrade on|off now sets Downgrade in anvil.

1.4: Big new feature

  • Added:
    • new config Fix held items which will "fix" (remove disallowed enchants) from all items put into player's hands. Default false
    • new el set command hold which toggles above
    • new command elfix, which fixes items in hand or inventory
      • with no options, fixes item in hand
      • with books option, fixes all books in inventory (in case you picked up illegal books)
      • with all option, fixes all items in player's inventory
      • by default, any player can use
    • New config item Disallowed anvil enchants that only applies in anvil and can override global settings in Disallowed enchants
      • same format as global Disallowed enchants
    • New config item Disallowed table enchants that only applies in enchantment table and can override global settings.
    • New Group_<name> syntax allowed within any of disallowed enchant configs.
      • each group has an associated permission enchlimiter.Group_<name> which, if player has it, the group limits do not apply.
      • otherwise, the limits override the global settings (ex. so you restrict level 3 in global, but restrict to level 1 in group).
      • can use same group name within each of Disallowed enchants, Disallowed anvil enchants, Disallowed table enchants
      • this allows you to create special groups/classes of players that are the only ones who can perform their restricted enchants
  • Fixed:
    • bug 'can't find jar file' on Windows 7 64 bit when directory name has a space

1.3.2: Bug fixes and one new feature

  • Changed:
    • restore anvil durability if have to cancel an anvil event
    • BOOK or ENCHANTED_BOOK are equivalent and apply to one another in Disallowed enchants
    • message on rare occurrence that can't cancel an anvil enchant now reads:
      • "<player> closed inventory or anvil died and got an illegal item: <crafted details>"
  • Added:
    • Infinite anvils: new config item that repairs anvil whenever it is used, such that it never wears out.
      • new associated command option for set el set infinite true|false
  • Fixed:
    • NPE when renaming an item in an anvil
    • occasional NPE when using an anvil and have to cancel the event
    • book+book enchants which exceeded Disallowed enchants were not being caught
    • removed shift-click in anvil result item duplication bug

1.2: Many changes, but not all tested

  • Fixed: NPE when enchanting books with a disallowed enchant > 1. Ticket 2.
  • Added:
    • Allow repairs: new config item that allows repairing disallowed items in an anvil. Default = false
      • note that repairs are defined as same items in each slot, rightmost item has no enchants. Anything else might be an attempt to boost enchants.
        • this does mean that some repairs won't work, such as two identically enchanted items except for wear. It's costly to repair this way; suggest repairing each tool individually
      • related new permission, enchlimiter.repairs, allows repairs even if not configured to.
    • Downgrade repairs: new config item that downgrades repaired items until they are legal; if that is not possible, repair is disallowed
      • only active when Allow repairs is true
      • related new permission, enchlimiter.repairs.nodowngrade ignores if Downgrade repairs is true.
    • Fix spawned items: new config flag, which if you set to true will allow downgrade or remove illegal enchants from spawned items. Default false.
      • impacts any item "dropped" like mob drops, player drops, or fishing.
      • this behavior used to be the case when Stop pickup was true; now you have individual control.
    • set command of base el command permits changing boolean configuration values
      • requires further to detail desired boolean:
      • multiples on|true allows multiple enchanted items. Use off or false to restrict multiples.
      • pickup on|true allows pickup of disallowed items, which will then be "fixed" so they can be used
        • set to off|false to disallow pickup of illegal enchanted items.
      • punish on|true allows punishing the player (not restoring XP) who attempted an illegal anvil action
      • repairs on enables repair protections; set off|false to permit players to repair (but not create) disallowed items
      • spawns on|true allows spawned items to have disallowed enchants
        • set to off|false to downgrade or remove disallowed enchants on spawned items
      • downgrade on when repairs are allowed, will attempt to downgrade repair to allowed level.
        • if cannot downgrade (ex. disallowed level is 1) the repair will not be allowed.
        • effectively sets Downgrade repairs config item.
      • message option allows setting one of three 'Message' config items
        • message cancel true enables Message on cancel
        • message limit true enables Message on limit
        • message disallowed true enables Message on disallowed
    • save command of base el command permits saving your changed configuration to config.yml


  • Fixed: bug that allowed bypassing limits with Shift-clicking
  • Added: el admin command
    • alias is enchlimiter if el is already in use
    • only available command today is reload, which you would run after editing your config.yml

1.0: Restore XP on cancelled anvil actions

  • Fixed:
    • Added new config Restore levels that restores XP on cancelled enchant added in 0.9
      • default is different than 0.9 and is true
      • if you want same behavior as 0.9 (to punish?) set to false
      • See history below for explanation

0.9: Fixed some loopholes

  • Added:
    • guard against combining like-enchanted items in anvil to get disallowed enchant level
    • guard against combining already-enchanted item with low-level book to get illegal enchant level
    • fail-safe check to prevent picking up illegal item out of anvil result slot
      • issues new attempted3 server log that user "almost took result of" disallowed anvil
        • because you have to try pretty hard (most of the time) to get this to happen, you might want to punish repeat offenders
      • this is because Bukkit sometimes doesn't provide, or loses, the placement inventoryClickEvent (see Caveats below) from client->server
      • when undoing the anvil action, the two crafting ingredients are placed back into the anvil, and the illegal item deleted.
      • BUT, experience is not currently returned.
        • you may like this, to keep as "punishment" for trying to cut corners
        • but rarely, the first time you place an item it may not get caught by normal checks so people might still complain.

0.8: More features!

  • Added: guards against world-generated items (like fishing, or mobs)
    • checks items you pick up, and either you cannot or removes the restricted enchant(s).
      • by default, removes the restricted enchants. Note that the item may lose all enchants
      • or set Stop pickup to true and you won't even be able to pick it up.
        • recommend this if you have some players with disallowed or multiple permissions; they can take the item
        • has built-in restriction on messaging to prevent repeats, but
        • if player sits on top of the item, he will be given a chat message every 2 seconds
    • Also silently checks spawned/dropped items as they appear, modifying if Stop pickup is NOT set
  • Changed:
    • disallowed enchants will not be completely removed, but reduced to highest allowed level
      • XP returned is calculated proportionally at the enchant table.
      • if disallowed level is 1, enchant will be removed
      • I have ideas to fix this, but wish to get this version out now as it may take time.

0.7: More features

  • Added:
  • Changed:
    • XP return algorithm more generous, and proportional to the entire enchantment operation
    • message to users informs them of returned XP.

0.6: further features

  • Added:
    • "Disallowed enchants" works on anvils
    • "ALL" disallowed enchantment now configurable.

0.5: Added "Disallowed enchants" feature

  • Not yet working on anvils

0.3: Included default languages/lang-eng.yml


  • Removed : some debug messages to console.

first release

Does NOT support 1.8 enchanting, different costs & lapis.

Fixed in 1.4: Under Windows, if a directory name in path to plugins contains a space, cannot add more languages from jar (currently there are none, so not an issue yet).

Fixed in 1.0: Sometimes able, with enough attempts, to get anvil enchant with blocked enchant to be allowed. When picking up that item, effect is undone except for XP expended is not returned.