TransWikia.com

Selector command in tellraw command does not work

Arqade Asked by Akidus on January 18, 2021

Is this a 1.9 thing, or is my selector in my /tellraw command not working?
Here is the code:

/tellraw @p ["",{"text":"[",{selector:"@p"},"]"},{"text":" Woah, this is wierd.","color":"gold"}]

For me, in 1.9 (16w02a), the command is not working. Nothing will appear in chat.

However, when I take out the selector:

/tellraw @p ["",{"text":"[ ]"},{"text":" Woah, this is wierd.","color":"gold"}]

It works fine.
Is the way I did the selector for @p wrong?

2 Answers

Your syntax is incorrect; you had not closed the current object before opening a new one within the array (causing a syntax error due to an object being opened without a name).

"text":"[", { selector

As of 1.9, JSON input must be strict, in that quotes must surround key names and string values. Your selector tag was missing quotation marks around the key.

Fixed command:

/tellraw @p ["",{"text":"["},{"selector":"@p"},"]",{"text":" Woah, this is wierd.","color":"gold"}]

Correct answer by Skylinerw on January 18, 2021

Here is the code for it. /tellraw {["text":"Woah, this is weird.","color":"yellow"],["selector":"@p"]}

Answered by Minecraft Hacker on January 18, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP