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 at 19:07
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"
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

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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