How do I fix a command generated by MCStacker? [duplicate]

Solution 1:

Look carefully at the help popup that appears when you click the ? next to the Command field.

It says:

The command to execute. Commands containing double quotes will need to be escaped. Prefix any double quotes with a backslash.
For example \"

That gives you all the info you need to fix the command.

The issue that arises when you fail to follow this info is linked at this question. Read it and its accepted answer if you want a technical insight as to what is going on.


In your case...

Your current command is:

/give @s chain_command_block{display:{Name:'{"text":"Consequence block"}'},Enchantments:[{}],BlockEntityTag:{Command:"SEE_BELOW",auto:1b}}

Your command that is in the command block is:

execute if score @p deaths matches 10 run title @p title {"text":"this is a test","color":"#60FF93","bold":true}

Looking at the quote above, you will need to go through your command and put a \ before every ". Doing it on the following strings of text would look like this:

  • """ would become \"\"\"
  • "hello" would become \"hello\"
  • {"text":"You died!"} would become {\"text\":\"You died!\"}

And your command listed above would become:

execute if score @p deaths matches 10 run title @p title {\"text\":\"this is a test\",\"color\":\"#60FF93\",\"bold\":true}

Paste the above into the Command field of MCStacker and it should work just fine.