Clickable text in /tellraw [duplicate]
Here's the command:
/tellraw @p ["",{"text":"[HINT]","color":"dark_green","bold":true,"clickEvent":{"action":"run_command","value":"/tellraw @p {\"text\":\"This pickaxe cannot break lit glowstone lamps.\",\"color\":\"light_purple\"]"},"hoverEvent":{"action":"show_text","value":{"text":"","extra":[{"text":"Click For Hint"}]}}}]
That brings up [HINT], which is bold and dark green, and when you hover over it, it says "Click For Hint". The problem is that when you click it, it should activate a tellraw command, however when I click it, I get:
Invalid json: Unterminated object at line 1 column 81
This JSON is flawless (or so I thought). What is wrong?
Best Answer
I have figured it out! try this:
/tellraw @p [{"text":"[HINT]","color":"dark_green","bold":"true","clickEvent":{"action":"run_command","value":"/tellraw @p [{\"text\":\"This pickaxe cannot break lit glowstone lamps.\",\"color\":\"light_purple\"}]"},"hoverEvent":{"action":"show_text","value":{"text":"","extra":[{"text":"Click For Hint"}]}}}]
the true in bold:true was missing the quotes, I had to remove one "}" at the very end because there was one too many and I took out the two quotes at the beginning because they didn't seem like they would do anything. I also switched some of the "}" and "]" in the tellraw command containing the hint.
Pictures about "Clickable text in /tellraw [duplicate]"
![Clickable text in /tellraw [duplicate] - Woman in White Shirt Holding Brown Wooden Board Clickable text in /tellraw [duplicate] - Woman in White Shirt Holding Brown Wooden Board](/assets/images/clickable_text_in_tellraw_duplicate_1.jpeg)
![Clickable text in /tellraw [duplicate] - Women Sitting on the Floor while Writing on a Yellow Paper Clickable text in /tellraw [duplicate] - Women Sitting on the Floor while Writing on a Yellow Paper](/assets/images/clickable_text_in_tellraw_duplicate_2.jpeg)
![Clickable text in /tellraw [duplicate] - Text Clickable text in /tellraw [duplicate] - Text](/assets/images/clickable_text_in_tellraw_duplicate_3.jpeg)
How do I make text clickable in chat?
How to Enter the CommandMinecraft 1.19 - How To Make Clickable Text In Chat
More answers regarding clickable text in /tellraw [duplicate]
Answer 2
Your command is missing some brackets and braces. Try this instead:
/tellraw @p ["",{"text":"[HINT]","color":"dark_green","bold":true,"clickEvent":{"action":"run_command","value":"/tellraw @p {[\"text\":\"This pickaxe cannot break lit glowstone lamps.\",\"color\":\"light_purple\"]"},"hoverEvent":{"action":"show_text","value":{"text":"","extra":[{"text":"Click For Hint"}]}}}}]
I can't verify that it'll do exactly what you want, but I'm fairly certain I've fixed the syntax error.
Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.
Images: Karolina Grabowska, Karolina Grabowska, Karolina Grabowska, Karolina Grabowska
