Minecraft Blogs / Tutorial

Command Tutorials: Tellraw

  • 12,115 views, 1 today
  • 5
  • 1
  • 9
Bob_In_Soup's Avatar Bob_In_Soup
Level 44 : Master Electrician
32
Hey, guys! This is Bob here and today I want to bring you a tutorial on the tellraw command. This command is very useful, yet hard to understand.

[EDIT: ON ALL THE LINKS THAT ARE FOR COLOR, SCROLL DOWN ON THE LEFT SIDE AND CLICK CHAT COLOR]

There are a few things you must understand before we start. Realize you are learning JSON. Pretty much everything you type goes in quotation marks. Here is an example command:

/tellraw @p {"text":"Yo, Planet Minecraft","color":"dark_red"}

This will output: Yo, Planet Minecraft

Lets start with the tutorial. EVERYTIME you start to type this command, it will go "/tellraw @[selector] {}". The [selector]'s, if you didn't know, are @a for all players, @r for a random player, @p for the nearest player to the command block or player(yourself).

Now, inside of the curly brackets, we can put all the information. The first thing you put is this exactly:

"text":" [text here] ","color":" [color] "

So this is what it does. The "text" tells the client that its going to output something into the chat. The " [text here] " is just where you put the text you want it to output. Anytime you want to add quotation marks inside of the quotation marks(if that makes sense), you just add a back slash( ). The "color" part tells the client that it's going to output something in color. The [i]" [color] "[/i] is where you add your color.

Now, you're probably wondering what the commas and colons do. Colons are pretty much equal signs. So in our line of text above, we have [i]"text":" [text here] " [/i]This is pretty much saying, that the [i]"text"[/i] will be[i] " [text here] "[/i]. The one comma we see is before the[i] "color"[/i] part. The comma says that the text will have color(describing it,[i] " [text here] ","color"[/i]).

This next part is a little complicated. We have our regular line of text, but say we want some more that have a different color:

[i]"text":" [text here] ","color":"[url=jd.bukkit.org/rb/apidocs/]color[/url]",extra:[{"text":" [more text here] ","color":"[url=jd.bukkit.org/rb/apidocs/]another color[/url]"}][/i]

So we have the same thing as the first part, but we added the [i]extra:[][/i] part. Extra is pretty much everything after the first part of text. Inside of[i] extra:[][/i], you go back to the first part of the text. Just make sure you put them inside of curly brackets. Everytime you go to make another color of text, you close the curly bracket you started and you put a comma, start another curly bracket, and continue. This is what it looks like, in visual terms:

[i]"text":"Hey, friends!","color":"yellow",extra:[{"text":" What do you want to do?","color":"green"},{"text":" I want to play Minecraft.","color":"red"}]}[/i]

Looks like this:[b][color=rgb(255,255,0)] Hey, friends![/color] [color=rgb(51,204,0)]What do you want to do?[/color] [color=rgb(255,0,0)]I want to play Minecraft.[/color][/b]

[size=12px][color=rgb(34,34,34)]To make bold, type this after the color tag:[/color][/size]

[size=12px][color=rgb(34,34,34)][i]{"text":"Hey PMC","color":"red","bold":"true"}[/i][/color][/size]

[size=12px][color=rgb(34,34,34)]This will output this:[/color][/size]

[size=12px][color=rgb(34,34,34)][b][color=rgb(255,0,0)]Hey PMC[/color][/b](That's suppose to be bolded :O)[/color][/size]

[size=12px][color=rgb(34,34,34)]That will work with everything (italic,bold,strikethrough)[/color][/size]
Well, this is the tutorial! I would always love to add more if you'd like, it's a little hard to do, but I try! Thanks for reading all the way through if you have made it this far, and be sure to:

DIAMOND
[url=imgur.com/dV3lFt8][img=Image]http://i.imgur.com/dV3lFt8.png[/img][/url]

FAVORITE
[url=imgur.com/LAvQTY4][img=Image]http://i.imgur.com/LAvQTY4.png[/img][/url]

SUBSCRIBE
[url=imgur.com/ldB45G0][img=Image]http://i.imgur.com/ldB45G0.png[/img][/url]
Tags

1 Update Logs

Bold, Italics, Etc. : by Bob_In_Soup 01/13/2014 5:57:35 pmJan 13th, 2014

I didn't include the fact that you could make bold, italics, etc. So here it is:

To make bold, type this after the color tag:

{"text":"Hey PMC","color":"red","bold":"true"}

This will output this:

Hey PMC(That's suppose to be bolded :O)

Create an account or sign in to comment.

1
07/01/2015 1:30 am
Level 13 : Journeyman Dragon
EnderCat17
EnderCat17's Avatar
how come anytime i do anything with spaces it always says like "you can't do this becuse of JSON blah blah blah"?
1
07/01/2015 1:35 am
Level 44 : Master Electrician
Bob_In_Soup
Bob_In_Soup's Avatar
Can you give me an example?
1
04/23/2015 8:32 pm
Level 8 : Apprentice Skinner
Derpymun
Derpymun's Avatar
Oh lol this is the one :P I DID NOT copy you i swear! I didnt know that anyone ever posted one!
1
04/23/2014 11:54 pm
Level 8 : Apprentice Explorer
PyroPolarMC
PyroPolarMC's Avatar
Do you need to have the quotation marks with "text" ?????
1
04/24/2014 6:00 pm
Level 44 : Master Electrician
Bob_In_Soup
Bob_In_Soup's Avatar
When this tutorial was written yes, but as of now I do not think it is required. And, the quotations do not need to go around everything.... PyroPolarMC
1
04/25/2014 3:04 am
Level 8 : Apprentice Explorer
PyroPolarMC
PyroPolarMC's Avatar
Why thank-you good sir!
1
04/26/2014 10:28 pm
Level 44 : Master Electrician
Bob_In_Soup
Bob_In_Soup's Avatar
No problem!
1
01/13/2014 10:11 am
Level 3 : Apprentice Network
Derekholio
Derekholio's Avatar
Alternatively, you can use this link to take you directly to the colors. http://jd.bukkit.org/rb/apidocs/org/bukkit/ChatColor.html

The colors are from CraftBukkit's API, so I don't know if they all work, but it is probably a safe assumption that they do. I'm unsure how to do formatting. IE: Bold, Italic, etc.
1
01/13/2014 5:35 pm
Level 44 : Master Electrician
Bob_In_Soup
Bob_In_Soup's Avatar
To do Bold, Ialic, etc, you must type after the color tag, ,"bold":"true", or any other one. The only one that I am unsure of is the "underline" tag.
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome