Repository navigation
Applying Enchantments
This page explains how enchantments get onto items, and the rules you can add on top of the vanilla ones:
- Dragging a book onto an item, optionally with a price.
- Enchantments that need another one first, or that upgrade another one.
- A maximum number of enchantments per item, and a maximum per type.
- Changes to the anvil, the grindstone and the enchanting table.
The rules on this page are checked by every way of putting enchantments on an item that players use: dragging books, the anvil and the enchanting table. That way a player cannot get around a limit by using the anvil instead of a book.
They are checked in this order:
- The item accepts the enchantment (
supported-items). Books accept everything. - It is not incompatible with an enchantment already on the item. Enchantments it
replacesdo not count. - The level is not already the highest.
- The enchantments it
requiresare on the item. - The item is under the maximum number of enchantments.
- The item is under the maximum of the enchantment's type.
Books are not limited by 5 and 6: a book can hold any number of enchantments. The limits apply when the book is put on an item.
Administrator commands do not apply the MetaEnchants-only rules (requires, the per-item limit and the type limit). The game still enforces item support and incompatibility for /enchant and /forceenchant, and /forceenchant ignores the maximum level. /metaenchants apply follows every rule on this page.
Players can apply a book without an anvil:
- Open the inventory.
- Pick up the book with the mouse.
- Click it on the item.
If everything is right, the item gets the enchantment, the book is used, and the player hears the enchanting sound. If not, nothing changes, the book stays on the mouse, and the player reads why:
This item has Sharpness V, which does not work with this book.
How the level works, like in the anvil:
| The item has | The book has | Result |
|---|---|---|
| Nothing | Vampirism II | Vampirism II |
| Vampirism II | Vampirism II | Vampirism III (one level up, if below the maximum) |
| Vampirism II | Vampirism IV | Vampirism IV |
| Vampirism IV | Vampirism II | Refused: the item already has a better level. |
A book with several enchantments applies all of them, or none if one is refused.
Turn it on or off for the whole server in config.yml:
apply:
drag-and-drop: trueand for one enchantment in its file:
drag-and-drop: falseWhen an enchantment does not allow it, its books behave as in vanilla: clicking swaps the book and the item.
It works on items in the player's own inventory, also while a chest or another container is open. It does not work in the creative inventory screen, or on items inside containers and menus of other plugins.
An enchantment can cost something to apply by dragging. Write it in the enchantment file:
price:
money: 100
levels: 3
items: ["DIAMOND 2", "EMERALD"]
per-level: true| Option | What it costs |
|---|---|
money |
Money from the player's balance (needs Vault and an economy plugin). |
levels |
Experience levels. |
exp |
Experience points, for prices smaller than a level. |
items |
Items from the inventory, written as MATERIAL amount. The amount can be left out for 1. |
per-level |
true multiplies the whole price by the level of the book. |
With the example above, a level III book costs 300 money, 9 levels, 6 diamonds and 3 emeralds. If the player cannot pay all of it, nothing is taken and they read what they need. Players in creative mode do not pay.
The price is paid even if the book then fails.
requires:
vampirism: 2
minecraft:sharpness: 1This enchantment can only go on items that already have Vampirism II or higher and Sharpness I or higher. Write each enchantment with the level it needs at least. MetaEnchants enchantments can be written without metaenchants:; vanilla ones need minecraft:.
A list means level 1 is enough:
requires: [vampirism, minecraft:sharpness]The anvil and the enchanting table follow it too: they will not produce an item that has this enchantment without the ones it requires.
replaces: [swiftness]When this enchantment is put on an item, the enchantments in replaces are removed. It is the way to make upgrades: Super Speed replaces Swiftness, so the player does not need to remove one before adding the other, and the two are never on the same item.
replaces is applied when dragging books and with /metaenchants apply.
apply:
max-enchants: 5
count-vanilla: true-
max-enchants: the most enchantments one item can have.0means no limit. -
count-vanilla:truecounts vanilla enchantments too.falseonly counts MetaEnchants enchantments.
Give some players another limit with the permission metaenchants.limit.<number>. A player with metaenchants.limit.8 can have 8 enchantments per item, whatever max-enchants says. With several of these permissions, the highest wins.
Orbs add extra slots to one item on top of that limit: an item with two orbs used on it can have max-enchants + 2.
The anvil follows the rules above: if the result would break them, the anvil shows no result. It also has its own settings in config.yml:
anvil:
max-cost: 40
cost-multiplier: 1.0
rework-penalty: true
color-renames: false| Option | What it does |
|---|---|
max-cost |
The anvil says Too Expensive! when the cost reaches this. Vanilla is 40; a bigger number lets players keep combining. |
cost-multiplier |
Multiplies every cost. 0.5 makes the anvil half price; 2 doubles it. |
rework-penalty |
In vanilla, every anvil use makes the next one on the same item more expensive. false turns that off. |
color-renames |
Lets players with metaenchants.anvil.color use colors when renaming, like <red>Excalibur or <gradient:gold:red>Excalibur. Only colors and styles work, not clicks or other tags. |
The anvil does not use success and destroy rates.
The grindstone removes enchantments, except curses. You can protect others:
- In a type:
grindstone: falseprotects every enchantment of that type. - In an enchantment file:
removable: falseprotects that enchantment, whatever its type says.removable: truelets the grindstone remove it, even if its type says otherwise. - For vanilla enchantments, in
vanilla.yml.
removable: falseA protected enchantment stays on the item that comes out of the grindstone.
When the table rolls enchantments, MetaEnchants can change the result before it is given:
- Each MetaEnchants enchantment can have a chance to really be given, and a minimum level cost.
- Its type can make lower levels more common.
- The rules on this page are applied: a rolled enchantment that is missing its
requires, or that goes over a limit, is left out. -
config.ymlcan give fewer enchantments per roll. See Where Enchantments Appear.
If everything rolled is left out, the player still gets one enchantment (preferably a vanilla one), so the table never takes their levels for nothing.
| Command | What it does |
|---|---|
/metaenchants apply <enchantment> [level] |
Puts the enchantment on the item in your hand, following all the rules on this page (without price or rates). |
/metaenchants item |
Opens the menu with only the enchantments that the item in your hand accepts. |
- Players apply books by clicking them on items;
apply.drag-and-dropanddrag-and-dropturn it on and off. -
pricemakes applying cost money, levels or items. -
requiresandreplacesbuild chains of enchantments. -
max-enchantsandmetaenchants.limit.<n>limit enchantments per item; types limit them per kind. - The anvil, the grindstone and the enchanting table follow the same rules.