0

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?

1
  • 2
    Pro tip: It's spelled weird
    – MrLemon
    Commented Jan 28, 2016 at 10:04

1 Answer 1

3

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"}]
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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