Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Minecraft:Commands/enchant

From SAS Gaming Wiki
Revision as of 15:44, 9 April 2026 by SyncBot (talk | contribs) (Remove broken links to missing pages)

Template:Infobox command

Adds an enchantment to a player's selected Minecraft:item, subject to the same restrictions as an anvil.<ref>Template:Bug</ref> Also works on any mob or entity holding a Minecraft:weapon/Minecraft:tool/Minecraft:armor in its main hand.

Syntax

  • Java Edition
enchant <targets> <enchantment> [<level>]
  • Bedrock Edition
enchant <player: target> <enchantmentId: int> [level: int]
enchant <player: target> <enchantmentName: Enchant> [level: int]

Arguments

Template:Argument

Specifies the target(s).
Template:Arg desc

Template:El: Template:Argument
Template:El: Template:Argument or Template:Argument

Specifies the enchantment to be added to the item held in main hand by the target.
Template:Arg desc

Template:Argument

Specifies the enchantment level. Should be not greater than the maximum level for the specified enchantment<ref>Although /enchant enforces maximum levels and compatibility, other commands (such as Template:Cmd, Template:Cmd, and Template:Cmd) can bypass these restrictions.</ref>. If not specified, defaults to 1.
Template:Arg desc Template:IN, it should be between 1 and 2147483647 (inclusive).

Result

Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table

Output

Template:Output table Template:Output table Template:Output table Template:Output table Template:Output table Template:Output table

Examples

  • 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

History

Template:Expand section

Java Edition

Template:HistoryTable

Bedrock Edition

Template:HistoryTable

References

Template:Reflist

External links

Navigation

Template:Navbox commands

de:Befehl/enchant es:Comandos/enchant ja:コマンド/enchant ko:명령어/enchant lzh:令/enchant pt:Comandos/enchant ru:Команды консоли/enchant th:คำสั่ง/enchant uk:Команди консолі/enchant zh:命令/enchant