2

I have two commands I'd like to combine into one, but I'm not sure how to go about combining them. Is this possible?

Here are the commands. They work individually, I just can't seem to get them to work together:

/give @p jukebox 1 0 {CanPlaceOn:["minecraft:melon_block"]}
/give @p jukebox 1 0 {display:{Name:"Box"}}

Can you help me to add one of the commands to the other one?

8

You can add multiple tags (or properties) when giving yourself an item. If you are familiar with JSON it is very similar to that.

In this example CanPlaceOn:["minecraft:melon_block"] and display:{Name:"Box"} are tags, you can add multiple tags to an item by separating it with a comma.

Therefore you can spawn the item using the following:

/give @p jukebox 1 0 {CanPlaceOn:["minecraft:melon_block"],display:{Name:"Box"}}

| improve this answer | |

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