0

I used the following command

/give @p diamond_axe 1 0 {Can Destroy:oak} 

And it said

  • missing '}' line 1, Column 2.

There are no columns though? Why won't it work?

0

1 Answer 1

0

You need to know what version of Minecraft you are using, because the command changes over time.

I assume you want this for the latest version. In the latest version of vanilla Minecraft, the command is:

/give @p minecraft:diamond_axe{CanDestroy:["minecraft:oak_log"]} 1

For more than one block, for example, logs and planks, you can do:

/give @p minecraft:diamond_axe{CanDestroy:["minecraft:oak_log","minecraft:oak_planks"]} 1

It is also worth noting that the CanDestroy NBT flag will ONLY work in adventure mode. If the player is in normal survival, the CanDestroy NBT flag is ignored - the axe will break any wood block as it normally would.

Your command won't work because:

  • You have a space between the words Can and Destroy - it should be CanDestroy - one word.
  • It appears to be a give command for 1.12.2 or earlier - the zero is a datavalue, which is no longer used
  • There is no block called 'oak' - it's oak_log or oak_planks

Older versions would need the following:

Minecraft 1.8 to 1.12.2:

/give @p minecraft:diamond_axe 1 0 {CanDestroy:"log:0"}

Before Minecraft 1.8:

/give @p minecraft:diamond_axe 1 0 {CanDestroy:"17:0"}
1
  • Incorrect! This question is for Minecraft Bedrock Edition. Your answer only works in Minecraft Java Edition.
    – One 2 Many
    Commented Aug 18, 2020 at 2:43

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