The new beta 1.0.5 has introduced /give command.
How do I add the enchant attribute?

  • Just to clarify, are you asking how to to /give a weapon object that has an enchantment on it? – user973 Mar 17 '17 at 21:04
  • Yup in minecraft pocket edition – MasterXplayz Mar 19 '17 at 11:11

Components are in JSON format. However, some of the ones on PC don't exactly work as suspected.

Example of JSON format:

{"fieldname":"field content"}


| improve this answer | |
  • Does this make use of the give command? How? Can you illustrate that? – Timmy Jim Jun 13 '17 at 22:12
  • After a couple years, I have determined that my answer is, in fact, probably a bad answer. I was attempting to illustrate the format used in Pocket Edition commands (and also in Java commands). In short, this ain't it, chief, it does not help to answer the question. – Blake Leonard Jun 23 '19 at 17:52

Say you want a sword with max sharpness and unbreaking, this is the command:

/give @p diamond_sword 1 0 {ench:[{id:16,lvl:32767},{id:21,lvl:32767}]}

If it doesn't work, then I don't know.

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.