-1

I'm attempting to give a player an enchanted sword using the following command:

/give @p diamond_sword 1 0 {"ench":[{"id":5,"lvl":1}]}

Why do I see this error?

This copied from example for Bedrock Edition, but not working.

Command Block

3
  • where did you copy that example from? – Plagiatus Feb 24 '18 at 11:39
  • that's what I thought. the person in that thread expected pe to just take over all the NBT from java. that is sadly currently not possible in pe as the only supported components are can_place_on and can_break as @Pepijn pointed out in this answer below. – Plagiatus Feb 24 '18 at 18:43
2

The only "components" supported are can_place_on and can_break. Nothing else. You will have to externally edit items (MCC Toolchest PE, Universal Minecraft editor, etc.) or just enchant them ingame.

4
0

There is not a way to use this command, as there is no NBT access, except for the can_place_on and can_break tags. This is quite upsetting, as I wish to use commands on my switch to recieve a God Bow (/give @p minecraft:bow{display:{Name:"{\"text\":\"God Bow\"}",Lore:["The Best Bow in The World!","Will Shoot Zeus's Lightning Bolts!"]},Unbreakable:1b,Enchantments:[{id:"minecraft:power",lvl:100000},{id:"minecraft:punch",lvl:100000},{id:"minecraft:flame",lvl:100000},{id:"minecraft:infinity",lvl:1},{id:"minecraft:mending",lvl:100000}]} 1). I really hope Mojang AB Updates that soon.

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