How to enchant items with commands in Minecraft
Hold the item and type /enchant @p minecraft:sharpness 5 in chat as an operator. It stays within the normal level and compatibility limits.
enchant
Adds an enchantment to the item a player or mob is holding, within the normal level and compatibility limits.
/enchant <targets> <enchantment> [<level>] Examples
/enchant @p minecraft:sharpness 5 Adds Sharpness V to the nearest player's held item.
/enchant Steve minecraft:mending Adds Mending to Steve's held item.
Arguments
targetsRequired- Players or mobs holding the item.
enchantmentRequired- Enchantment ID, for example
minecraft:sharpness. levelOptional- Enchantment level. Defaults to 1.
What it does
Applies an enchantment to the item in the main hand. It refuses levels above the enchantment's maximum, items the enchantment does not fit, and enchantments that conflict with ones already on the item. To go beyond those limits, give the item with an enchantments component using give instead.
Good to know
- Needs operator permission level 2.
Run it on your server
On a SLASHPLAY server, type it in the Console tab without the leading slash; in game, operators type it in chat with the slash. New to this? Start a Minecraft server first.
Your own
Minecraft server.
From $0.03 an hour, only while it runs. New accounts get 6 free tokens.