7

I'm trying to update the commands on a map to 1.13, every time I try to add a team with /team add Green Creeper Corp it wont accept the display name. I can use /team add Green, but I would like the name of Creeper Corp. I keep getting this error:

Invalid chat component: Use JSONReader.setLenient(true) to accept malformed JSON at line 1 column 2 path $[0] ...add Green [Creeper Corp]<--[HERE]

Is there a way to get it to accept the display name? and if so how?

  • Wow, that's a really bad error message. Basically tells you nothing about what to do. – Fabian Röling Feb 5 '19 at 19:07
  • 5
    Possible duplicate of Minecraft 1.13 display:{Name:""} NBT tag – pppery May 23 at 16:00
  • This is definitely not a duplicate. Find me a more generic string parsing in 1.13+ question, and I'll happily close both to that, but these two are otherwise completely unrelated. – MBraedley May 26 at 16:19
9

1.13 changed how you set display names. They must now be made with a json text component. For example:

team add Green {"text":"Creeper Corp"}

It's better this way, because now you can do stuff to the display name that you previously couldn't do. For example:

team add Green {"text":"Creeper ","color":"green","bold":"true","extra":[{"text":"Corp","color":"gold","italic":"true","underlined":"true"}]}

In the case of /team, you can also use a regular quoted string as a shortcut:

team add Green "Creeper Corp"
| improve this answer | |
6

JSON is very picky about input. It expects Strings to be enclosed in "".

You can use /team add Green "Creeper Corp" to add your team.

enter image description here

| improve this answer | |

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