0

I'm adjusting a tellraw command to use with 1.9 and the selector text is showing as green/not bolded, but the rest is displaying correctly. Is there something wrong with my syntax?

/execute @a[tag=!setup] ~ ~ ~ /tellraw @a {"text":"","extra":[{"text":"Welcome ","color":"gold","bold":"true"},{"selector":"@a[tag=!setup]","color":"gray","bold":true},{"text":" to the server!","color":"gold","bold":"true"}]}
3

This is caused by scoreboard team formatting. The display names obtained from the selector will be stylized separately if the target is in a team. Since the formatting options of the display names are being set at their own depth, it overwrites formatting inherited from the parent, being color, bold, italic, underlined, obfuscated, and strikethrough (all defaulting to false without a third-party NBT editor to modify the prefix in the scoreboard.dat file and color is defined by the team option).

As well, insertion, hoverEvent, and clickEvent will be overwritten no matter if the target is in a team or not. However, clickEvent will only be overwritten for player display names and not non-player display names.

You will either have to remove the player from the team before running the command or wait before adding them to the team until after the command runs.

  • I should've known better XD. Thank you so much for pointing this out. – theBeaks Feb 25 '16 at 12:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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