mojira.dev
MC-44688

/clear fails on strings containing spaces

I used this command:

/clear @p tripwire_hook 0 1 {display:{Name:"Chest Key"}}

in a command block, however after running it, I saw this error:

Data tag parsing failed: unbalanced quotation: {display:{Name:"Chest

This means that when using data tags on /clear, writing a space inside of a data tag informs the /clear command to go to the next possible command parameter, which doesn't exist here, so it just doesn't use it. No problems with this command:

/clear @p tripwire_hook 0 1 {display:{Name:"Key"}}

As a map maker, I would like to see a fix before 14w03a. That chest key stuff is awesome, the only problem currently is that I need to use the "Key" name, however I can't use names like "Chest Key" or "Key #2".

Linked issues

Comments 3

Just so you know, you can also use:

/setblock ~ ~ ~ chest 0 replace {Lock:"Chest Key"}

I had this same problem. Except instead of running into unbalanced quotation, i had mine run into an unbalanced brackets error when doing lore. I hope this is fixed before thursday.

@MCGamer20000 And...? In what does it help? I knew this... please read summaries in the future...

Edit: Wait... is that the whitespace symbol?

Zatherz

Nathan Adams

Confirmed

Minecraft 14w02c, Minecraft 14w03a, Minecraft 14w03b, Minecraft 14w05b

Minecraft 14w06a

Retrieved