I’m typing in the command:

/give @p lever 64 0 {can_place_on : [“minecraft:iron_block”]}

and it keeps on coming up with:

line 1 column 2 missing ‘}’ or object member name

I don’t see what I’m doing wrong

  • 1
    I'm not familiar with xbox commands, but I know that in 1.13 Java Edition the correct synax is /give @p lever{CanPlaceOn:["iron_block"]} 64. You could also try /give @p lever 64 0 {CanPlaceOn:["iron_block"]} If you're in 1.12 or under. – SpiceWeasel Mar 27 '19 at 17:10
  • 1
    @SpiceWeasel the data tag is in the correct spot. I think the issue is the spaces, which you aren't allowed to have within the data tag AFAIK. – MBraedley Mar 27 '19 at 17:26
  • I tried it without spaces but I didn’t work – Apeboybot Mar 28 '19 at 17:01

the spaces may be messing it up. try only doing give @p lever 64 0 {CanPlaceOn:["iron_block"]}.

  • The command didn’t work – Apeboybot Apr 5 '19 at 16:50
  • okay. i'm not sure how accurate it is since i don't have my Xbox One near me at the moment to test, but the Minecraft Bedrock Wikia page says that /give @p <block> 1 0 {"minecraft:can_place_on":{"blocks":["<block>"]}} should work effectively. – EarthToAccess Apr 6 '19 at 19:22

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