Item
item/enchant
Item Enchant
Gets, sets, checks, or removes an enchantment on an ItemStack.
Note: Uses the Paper Registry API — enchantment names are lowercase (e.g. "sharpness", "protection", "unbreaking"). SET and REMOVE return a cloned item; GET and HAS return the original unchanged.
Inputs
| Name | Type | Optional | Description |
|---|---|---|---|
item |
item_stack | The source ItemStack. | |
enchantment |
string | ✓ | Enchantment name (e.g. sharpness, unbreaking). |
level |
number | ✓ | Enchantment level (SET only). |
Outputs
| Name | Type | Description |
|---|---|---|
item |
item_stack | Modified clone (SET/REMOVE) or unchanged item (GET/HAS). |
level |
number | Current enchantment level (GET), or 0 if not present. |
has |
boolean | True if the enchantment is present (HAS). |
Properties
| Key | Type | Default | Description |
|---|---|---|---|
op |
string | "GET" |
GET, SET, REMOVE, or HAS. |
enchantment |
string | "sharpness" |
Enchantment |
level |
number | 1 |
Level |
Examples
Give a Sharpness V sword
Create a sword and enchant it.
- Create Item (DIAMOND_SWORD) → Item Enchant
- Set op=SET, enchantment=sharpness, level=5
- Item Enchant → item → Player Give Item