> For the complete documentation index, see [llms.txt](https://opuszek.gitbook.io/itemblocker/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://opuszek.gitbook.io/itemblocker/rules/enchantments.md).

# Enchantments

An enchantment limit blocks an enchantment from a minimum level. Its mode says what happens to items that carry it.

```
/ib block enchantment <name> [level:<n>] [mode:block|downgrade|remove|confiscate] [in:preset]
/ib unblock enchantment <name> [in:preset]
/ib show enchantment <name>
/ib list enchantments [in:preset]
```

`level:` defaults to 1, so without it every level is blocked. Names are the Minecraft keys, such as `sharpness` or `minecraft:sharpness`; enchantments from data packs work with their namespace.

## Modes

Examples for Sharpness blocked from level 5:

| Mode                  | A Sharpness V sword                                                                                                                    |
| --------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| `block` (the default) | is blocked for every [action](/itemblocker/rules/actions.md). Enchanting tables stop offering Sharpness V and anvils do not produce it |
| `downgrade`           | becomes Sharpness IV, the highest allowed level                                                                                        |
| `remove`              | loses Sharpness                                                                                                                        |
| `confiscate`          | is taken away and kept with [confiscated items](/itemblocker/features/scanning.md#confiscated-items)                                   |

```
/ib block enchantment sharpness level:5 mode:downgrade
/ib block enchantment thorns mode:remove
/ib block enchantment mending mode:confiscate
```

`/ib show` and `/ib list` name the mode, for example `from level 5 (lowered)`.

## When items are fixed

Items with `downgrade`, `remove` and `confiscate` are fixed as soon as a player has them: after joining, changing worlds, respawning, picking up, clicking in an inventory, closing one and enchanting. Enchanted books are fixed the same way. Enchanting tables offer such enchantments, and the result is fixed right after. The player is told what changed.

Items in containers are not changed until a player takes them. To fix those, see [Scanning existing items](/itemblocker/features/scanning.md).

## Bypassing

`itemblocker.bypass.enchantment` ignores every enchantment limit. A [preset bypass](/itemblocker/rules/exceptions.md) ignores the limits of that preset.

## In the menu

Open a preset, then **Enchantments**. Left click raises the level an enchantment is blocked from, right click lowers it, shift + right click unblocks it, and shift + left click changes the mode. Blocked enchantments have a red name.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://opuszek.gitbook.io/itemblocker/rules/enchantments.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
