Commands/enchant

Adds an enchantment to a player's selected item, subject to the same restrictions as an anvil.

Syntax

 * Java Edition


 * Bedrock Edition

Arguments

 * Specifies the target(s).
 * Specifies the target(s).


 * or
 * Specifies the enchantment to be added to the item held by the target.
 * Specifies the enchantment to be added to the item held by the target.


 * $$, it must be between 1 and 2147483647 (inclusive).
 * Specifies the enchantment level. Should be not greater than the maximum level for the specified enchantment. If not specified, defaults to 1.

Examples

 * To give the Infinity enchantment to all players holding a bow:
 * To enchant the nearest player's held sword with Sharpness 5:
 * To enchant the nearest player's held sword with Sharpness 5:

History
Befehl/enchant Comandos/enchant Команды консоли/enchant Команди консолі/enchant 命令/enchant