An immensely useful guide. I've been making a map based on Mann vs. Machine from TF2, and I'd previously tried using fireworks as a system to tell the game that you're ready to start the round. This is much better!
Sadly that seems to be only for color, which is fine as well. It doesn't affect strikethrough or bold (etc); if both of those are true in the parent and the color is set to reset in a child, they will still be true in the child.
I have updated the OP with better formatting and organization, as well as making the examples more up-to-snuff. I've also included new information ("suggest_command" for clickEvents and "with" for translations), thanks to Fr567ujnbv: http://www.minecraftforum.net/topic/2113692-clickable-username-with-tellraw/
Nice post, it just expanded my tellraw knowledge by 100%. And I thought I knew all about /tellraw Hope you well on it, and I'll be following for any updates!
I found a way to make sure the player doesn't execute the same clickEvent (or hoverEvent for that matter) more than once. Type in the chat /scoreboard objectives add clickToggle dummy , then set the run_command value to /scoreboard players set @p clickToggle 1. Have a clock connected to /testfor @p[score_clickToggle_min=1], then you can hook this up to a clock (along with your other commands), and you can use the clock to spam the chat with (/tellraw @p " "). Not really effective, but it's the only way I can think of, just get the message out of the chat bar as fast as possible. Anyone else think of a way to do this?
The Meaning of Life, the Universe, and Everything.
Join Date:
8/28/2013
Posts:
47
Minecraft:
Heavenira
Member Details
The amount of time and effort I see in this thread is unbelievable. Anyways, ever since 1.7 came out, I've always had this struggle finding out how /tellraw worked. I found Minecraft somewhere in Alpha and bought it during 1.3.1. The one thing I was into was redstone and usually finding out how things worked with it went out smoothly. I'm trying to understand how this works but I couldn't so I found a website that generates /tellraw commands on the wiki. I'd like to learn how this would work but it's not so clear to me still, sorry.
The amount of time and effort I see in this thread is unbelievable. Anyways, ever since 1.7 came out, I've always had this struggle finding out how /tellraw worked. I found Minecraft somewhere in Alpha and bought it during 1.3.1. The one thing I was into was redstone and usually finding out how things worked with it went out smoothly. I'm trying to understand how this works but I couldn't so I found a website that generates /tellraw commands on the wiki. I'd like to learn how this would work but it's not so clear to me still, sorry.
Is there anything in particular you're having trouble with? I'll attempt to rephrase best I can and provide further examples.
Would
/tellraw @a {text:"TEXT1",extra:["TEXT2","color":"green","bold":"true","TEXT3","color":"dark_red":"bold":"false","hoverEvent":{"action":"show_text","value":"This is TEXT3!"}]}
work? I'll try... Does not work... How can you use JsonReader.setLenient(true)?
Would
/tellraw @a {text:"TEXT1",extra:["TEXT2","color":"green","bold":"true","TEXT3","color":"dark_red":"bold":"false","hoverEvent":{"action":"show_text","value":"This is TEXT3!"}]}
work? I'll try...
No, when you have formatting options or functions tied to text, you need to encase all those options in curly brackets as well as set the "text" label to the text. As well, you do not need quotation marks around the tags unless they are strings of text, which includes "text" and "value" tags.
/tellraw @a {text:TEXT1,extra:[{text:"TEXT2",color:green,bold:true},{text:"TEXT3",color:dark_red,bold:false,hoverEvent:{action:show_text,value:"This is TEXT3!"}}]}
If you do not have any formatting or functions tied to text in the "extra" tag, you only need to use quotation marks and include the text. For example:
/tellraw @a {text:TEXT1,extra:[{text:"TEXT2",color:green,bold:true},{text:"TEXT3",color:dark_red,bold:false,hoverEvent:{action:show_text,value:"This is TEXT3!"}},"Text4"]}
Do you mean the error message "Invalid json: Use JsonReader.setLenient(true) to accept malformed JSON at line X column Y"?
That is usually caused when you try to initiate a tellraw such as:
/tellraw @a Hello there
The format requires you to encapsulate this text in quotation marks. So you cannot simply add text with spaces in it. The fix would be to encase in quotes:
I modified that for my own uses, but can't tell whats wrong. Can anyone try to figure that out? Thanks!
You need to paste your own code here for us to help.
Minecraft-things: http://skylinerw.com
More Minecraft-things: https://sourceblock.net
Guides for command-related features (eventually moving to Source Block): https://github.com/skylinerw/guides
I primarily hang out in the /r/MinecraftCommands discord, where there's a lot of people that help with commands: https://discord.gg/QAFXFtZ
Their corresponding subreddit: https://www.reddit.com/r/MinecraftCommands/
Sadly that seems to be only for color, which is fine as well. It doesn't affect strikethrough or bold (etc); if both of those are true in the parent and the color is set to reset in a child, they will still be true in the child.
Minecraft-things: http://skylinerw.com
More Minecraft-things: https://sourceblock.net
Guides for command-related features (eventually moving to Source Block): https://github.com/skylinerw/guides
I primarily hang out in the /r/MinecraftCommands discord, where there's a lot of people that help with commands: https://discord.gg/QAFXFtZ
Their corresponding subreddit: https://www.reddit.com/r/MinecraftCommands/
Minecraft-things: http://skylinerw.com
More Minecraft-things: https://sourceblock.net
Guides for command-related features (eventually moving to Source Block): https://github.com/skylinerw/guides
I primarily hang out in the /r/MinecraftCommands discord, where there's a lot of people that help with commands: https://discord.gg/QAFXFtZ
Their corresponding subreddit: https://www.reddit.com/r/MinecraftCommands/
tellraw @p
{
text:"Cloak",
color:blue,
bold:true,
hoverEvent: {
action:show_text,
value:"Be Invisible for 10 Seconds - 10 mana",
}
clickEvent: {
action:run_command,
value:"/effect @p 14 10"
}
}
Somebody help me!
You had a comma in the wrong spot:
Condensed:
Minecraft-things: http://skylinerw.com
More Minecraft-things: https://sourceblock.net
Guides for command-related features (eventually moving to Source Block): https://github.com/skylinerw/guides
I primarily hang out in the /r/MinecraftCommands discord, where there's a lot of people that help with commands: https://discord.gg/QAFXFtZ
Their corresponding subreddit: https://www.reddit.com/r/MinecraftCommands/
make a password keyboard
but there is a problem
the sys can't recognize player's ID
so don't know players's password is right
There is, but you have to use scoreboard. use the design in the link, replacing 'apple' with 'redstone'
http://imgur.com/a/3lRX3 How are you doing it? If you are willing to use a few command blocks in it, testfor can test for a certain name.
Minecraft-things: http://skylinerw.com
More Minecraft-things: https://sourceblock.net
Guides for command-related features (eventually moving to Source Block): https://github.com/skylinerw/guides
I primarily hang out in the /r/MinecraftCommands discord, where there's a lot of people that help with commands: https://discord.gg/QAFXFtZ
Their corresponding subreddit: https://www.reddit.com/r/MinecraftCommands/
the second click will fail
It seems you need to include the "http://" portion to URLs:
I've updated the OP to reflect this.
Minecraft-things: http://skylinerw.com
More Minecraft-things: https://sourceblock.net
Guides for command-related features (eventually moving to Source Block): https://github.com/skylinerw/guides
I primarily hang out in the /r/MinecraftCommands discord, where there's a lot of people that help with commands: https://discord.gg/QAFXFtZ
Their corresponding subreddit: https://www.reddit.com/r/MinecraftCommands/
Is there anything in particular you're having trouble with? I'll attempt to rephrase best I can and provide further examples.
Minecraft-things: http://skylinerw.com
More Minecraft-things: https://sourceblock.net
Guides for command-related features (eventually moving to Source Block): https://github.com/skylinerw/guides
I primarily hang out in the /r/MinecraftCommands discord, where there's a lot of people that help with commands: https://discord.gg/QAFXFtZ
Their corresponding subreddit: https://www.reddit.com/r/MinecraftCommands/
/tellraw @a {text:"TEXT1",extra:["TEXT2","color":"green","bold":"true","TEXT3","color":"dark_red":"bold":"false","hoverEvent":{"action":"show_text","value":"This is TEXT3!"}]}
work? I'll try... Does not work... How can you use JsonReader.setLenient(true)?
No, when you have formatting options or functions tied to text, you need to encase all those options in curly brackets as well as set the "text" label to the text. As well, you do not need quotation marks around the tags unless they are strings of text, which includes "text" and "value" tags.
So your command should read:
Condensed:
If you do not have any formatting or functions tied to text in the "extra" tag, you only need to use quotation marks and include the text. For example:
Condensed:
Minecraft-things: http://skylinerw.com
More Minecraft-things: https://sourceblock.net
Guides for command-related features (eventually moving to Source Block): https://github.com/skylinerw/guides
I primarily hang out in the /r/MinecraftCommands discord, where there's a lot of people that help with commands: https://discord.gg/QAFXFtZ
Their corresponding subreddit: https://www.reddit.com/r/MinecraftCommands/
I am not sure what you mean by this.Do you mean the error message "Invalid json: Use JsonReader.setLenient(true) to accept malformed JSON at line X column Y"?
That is usually caused when you try to initiate a tellraw such as:
The format requires you to encapsulate this text in quotation marks. So you cannot simply add text with spaces in it. The fix would be to encase in quotes:
Minecraft-things: http://skylinerw.com
More Minecraft-things: https://sourceblock.net
Guides for command-related features (eventually moving to Source Block): https://github.com/skylinerw/guides
I primarily hang out in the /r/MinecraftCommands discord, where there's a lot of people that help with commands: https://discord.gg/QAFXFtZ
Their corresponding subreddit: https://www.reddit.com/r/MinecraftCommands/