Editing
MinecraftCommands
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== enchant === {{/infobox |enchant |op |1.4.4|1.4.4-pre }} Adds an [[enchantment]] to a player's selected item, subject to the same restrictions as an [[anvil mechanics|anvil]]. ;Syntax : <code>enchant <''player''> <''enchantment ID''> [''level'']</code> ;Arguments : ''player'' :: Specifies the target(s). Must be a player name or [[#Target selectors|target selector]]. : ''enchantment ID'' :: Specifies the enchantment to be added to the item held by the target. Must be a valid [[Data values#Enchantment IDs|enchantment ID]] (for example, <code>16</code> or <code>minecraft:sharpness</code>). : ''level'' (optional) :: Specifies the enchantment level. Must be at least 1 and not greater than the [[Data values#Enchantment IDs|maximum level]] for the specified enchantment. If not specified, defaults to 1. ;Result : Fails if arguments are not specified correctly, if ''player'' fails to resolve to one or more online players, or if the enchantment is not valid for the item or conflicts with current enchantments (for example, "Fire Protection" cannot be given to armor which already has "Protection", and "Sharpness III" cannot be given to a sword which already has "Sharpness I"). : On success, adds the specified enchantment to the item held by the target. ;Examples : To give the Infinity enchantment to all players holding a bow: <code>enchant @a 51</code> ;Note : Although <code>/enchant</code> enforces maximum levels and compatibility, other commands (such as {{cmd|give}}, {{cmd|replaceitem}}, and {{cmd|entitydata}}) can bypass these restrictions. <!-- please retain double newline above for section differentiation -->
Summary:
Please note that all contributions to Hegemon Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Hegemon Wiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
Edit source
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Page information