When typing in commands such as:
/title @a title [{"selector":"@p"},{"score":{"name":"@p","objective":"obj"}}]
/tellraw @a [{"selector":"@p"},{"score":{"name":"@p","objective":"obj"}}]
/give @a minecraft:written_book{title:"",author:"",pages:["[{\"selector\":\"@p\"},{\"score\":{\"name\":\"@p\",\"objective\":\"obj\"}}]"]}
/give @a minecraft:sign{BlockEntityTag:{Text1:"[\"name: \",{\"selector\":\"@p\"}]",Text2:"[\"score: \",{\"score\":{\"name\":\"@p\",\"objective\":\"obj\"}}]"}}
/title
, /tellraw
, and the book works fine, but the sign shows the raw selector and no score.
Linked issues
is duplicated by 2
Attachments
Comments 6
Could someone add the labels "text-component", "score" and "nbt" to more easily find this ticket, I couldn't find it through my search queries.
EDIT
Thanks!
I'm trying to relearn these commands and I can't seem to get this right. So either it's broken again or I'm more confused then I originally thought (Most likely).. I'm in version 17w47b. I've tried:
/setblock ~ ~1 ~ sign[rotation=8]{"Text2":"{\"text\":\"Hello \"},{\"selector\":\"@a[distance=..2]\"}"} destroy
/setblock ~ ~1 ~ sign[rotation=8]{"Text2":"{\"text\":\"Hello\"},{\"selector\":\"@p\"}"} destroy
/setblock ~ ~1 ~ sign[rotation=8]{"Text2":"{\"text\":\"Hello\"},{\"selector\":\"@a[limit=1]\"}"} destroy
setblock ~ ~1 ~ sign[rotation=8]{"Text1":"{\"text\":\"Hello \"}","Text2":"{\"selector\":\"@a[limit=1]\"}"} destroy -> OUTPUT: Hello 'nextline' @a[limit=1] destroy
Hello shows up but nothing else (first three).. To be clear, I'm trying to display the players name onto the sign and eventually have it display a certain score of that player. Tellraw works great:
/tellraw @p [{"text":"Hello "},{"selector":"@a[distance=..2,limit=1]"},{"score":{"name":"@p","objective":"money"}}] -> OUTPUT: Hello name 189
I can't figure out the sign one.. EDIT: trying to make those code box things. Apologies!
For me it doesnt even show @s, it just doesn't show anything, also not working for action bar and subtitle