- Java Edition
enchant <targets> <enchantment> [<level>]
- Bedrock Edition
enchant <player: target> <enchantmentId: int> [level: int]
enchant <player: target> <enchantmentName: Enchant> [level: int]
- Specifies the enchantment to be added to the item held in main hand by the target.
- Specifies the enchantment level. Should be not greater than the maximum level for the specified enchantment[note 1]. If not specified, defaults to 1.
- Must be a 32-bit integer number. In Java Edition, it must be between 0 and 2147483647 (inclusive). In Bedrock Edition, it must be between 1 and 2147483647 (inclusive).
|Command||Trigger||Java Edition||Bedrock Edition|
|any||the arguments are not specified correctly||Unparseable||Failed|
|every selected players meets one or more of the following conditions:
|On success||Adds the specified enchantment to the item held by the target.|
|any||Java Edition||On fail||0||0||0|
|On success||1||1||the number of players whose items are successfully enchanted.|
|Bedrock Edition||On fail||0||N/A||N/A|
|On success||the number of players whose items are successfully enchanted.||N/A||N/A|
- To give the Infinity enchantment to all players holding a bow:
/enchant @a infinity
- To enchant the nearest player's held sword with Sharpness 5:
/enchant @p sharpness 5
|Pocket Edition Alpha|
|v0.16.0||build 5||Added |