I'm trying to make a button to teleport players to a debug room where errors in the map can be remedied, but it isn't working. With this command:
/tellraw @a {color:dark_gray,bold:true,text:"[",extra:[{color:red,bold:true,text:"CONFIRM NAVIGATION",hoverEvent:{action:show_text,value:[{text:"Click me to teleport to the debug room",bold:false,color:aqua}]},clickEvent:{action:run_command,value:"/tp @p 206 66 941 "},{color:dark_gray,bold:true,text:"]"}]}
I can't find any problems, but this error pops up:
Invalid json: Expected name at line 1 column 257
PLEASE HELP ME
You didn't close your first extra text completely before opening the next one. I should mention that you've defined the root formatting as "color:dark_gray,bold:true", but repeated that in one of the children. Since the parent already has that, all children will inherit it, meaning you don't need to repeat it (and also allowing you to do a simple quoted string rather than a full component). Fixed command:
/tellraw @a {color:dark_gray,bold:true,text:"[",extra:[{color:red,text:"CONFIRM NAVIGATION",hoverEvent:{action:show_text,value:[{text:"Click me to teleport to the debug room",bold:false,color:aqua}]},clickEvent:{action:run_command,value:"/tp @p 206 66 941 "}},"]"]}
Does no one know how to fix this? It's in a command block.
You do not need to escape the quotation marks at all since no nesting is occurring:
/tellraw @a [{"text":"A ","color":"gold","strikethrough":"true"},{"text":"Herobrine"},{"text":"'s","color":"gold"},{"text":" Guard","color":"black","bold":"true"},{"text":" has been summoned!","color":"gold"}]}"]
Hey there, maybe you mentioned this in the original post and I missed it, and if so, sorry, but I didn't see this written and thought maybe you should mention this useful piece of information about the selector:
The name(s) displayed by the selector are based around the person or command block that executed the tellraw command, not the people receiving it. So if Notch typed:
Jeb would receive the message:
Hello there, Notch.
Just seemed like something worth mentioning.
Origins are present for all commands, so it's a fairly spread out topic. For clarity, I can add a section on the end to provide a general idea of how origins in most commands work, as well as signs and books.
I thought it could be possible since it can open urls. Maybe with JSON?
Here is my idea. There is a weekly contest to build something and the competition itself would be written on a website or something. That is what the commandblock would read from the website and write out to the chat. Maybe with some extra /give player (given blocks/tools if it is required).
This is well beyond the scope of what is capable in vanilla.
EDIT: I've added an "Origins" section to describe a general usage as well as specific to /tellraw, /title, books, and signs.
@Skylinerw - Can't thank you enough for this! Bookmarked, +1's, & a MUST read for anyone interested in expanding their knowledge about MC's editable entities! The possibilities are endless... well, not quite, but the possibilities are still far beyond the standard "in game editors". So much so, that redstoners, map makers, adventure map creators, & the like, would benefit so much from this invaluable resource. Again, let me brown nose a bit more, thank you sooo much! Kudos, & Diamonds a plenty, for you!
|..|. X .. X .|..| |..|. O_o .|..|
PS - Do you keep this updated with new releases?
I'm assuming so, based on all the posts about additions, & all, but wanted to make 100% sure.
Thanks again,
:3:Mr.J
@Skylinerw - Can't thank you enough for this! Bookmarked, +1's, & a MUST read for anyone interested in expanding their knowledge about MC's editable entities! The possibilities are endless... well, not quite, but the possibilities are still far beyond the standard "in game editors". So much so, that redstoners, map makers, adventure map creators, & the like, would benefit so much from this invaluable resource. Again, let me brown nose a bit more, thank you sooo much! Kudos, & Diamonds a plenty, for you!
I do keep it updated, yes! If somebody mentions something new I take a look into it and modify the post where needed. Nothing new so far concerning JSON since 1.8's been completed, but hopefully we'll get some goodies in 1.9. The main thing to look out for is JSON support in all displayed string tags, such as "Lore" and "Name" for items, and "CustomName" for entities.
For the colored writing on the signs is there a way you can change the way it is facing because everytime i do the command they are facing north thanks in advance
EDIT: Oh and also how do you add another line of text?
For the colored writing on the signs is there a way you can change the way it is facing because everytime i do the command they are facing north thanks in advance
EDIT: Oh and also how do you add another line of text?
I want to add new lines of text too. I saw something on the minecraft wiki with \n makes a new line (Essentially presses enter) but I don't know how to use it.
Where did you get the commands.clone.success string?
I would like something like this:
/tellraw @p ["Press",{translate:just.my.example.rightclick}," to use."]
For non-op people, do I have to set up a trigger for them to be able to use click events?
Or is it possible to have a sign with click events (with the commands /tellraw and /setblock) without setting up a trigger?
Using signs will allow you to circumvent the OP requirement, so /trigger will not be necessary for that.
For the colored writing on the signs is there a way you can change the way it is facing because everytime i do the command they are facing north thanks in advance
EDIT: Oh and also how do you add another line of text?
I want to add new lines of text too. I saw something on the minecraft wiki with \n makes a new line (Essentially presses enter) but I don't know how to use it.
So right now there is no way to name a zombie with the nearest person's name.
/summon Zombie ~ ~ ~ {CustomName:"{selector:@a}"}
? Thanks in advance
No; the "CustomName" tag does not currently support JSON, though in the future most (if not all) string tags should support it. No idea when that will be, but it will solve that issue if it does get implemented into "CustomName".
Where did you get the commands.clone.success string?
I would like something like this:
/tellraw @p ["Press",{translate:just.my.example.rightclick}," to use."]
You can find the list of available translations for English in the version jar, under "assets\minecraft\lang".
This tutorial is very awesome and it helped me a lot recently, thanks for all the work you put in it!
Allthoug I have a problem, it semms that you can´t show custom names for items in books via the show_item in hoverEvents :/ It will show the raw json text in the book. Here is the code I used:
Does anyone have the same problem / know the solution?
You need to further escape the quotation marks. The first \" within the NBT data will close the "value" tag early, causing a syntax error. The formula for figuring out how many backslashes you need is: ([current depth] * 2) + 1
Since you're now at depth 1 (the previous depth being 0), you need 3 backslashes:
Is there any vanilla way to make subtitles go down lower than usual? I've seen a few Bukkit servers use it to where its over the hotbar, and I think that could be really useful in the future if it is possible.
Is there any vanilla way to make subtitles go down lower than usual? I've seen a few Bukkit servers use it to where its over the hotbar, and I think that could be really useful in the future if it is possible.
Not in vanilla unfortunately. The newline character cannot be used in /title.
You didn't close your first extra text completely before opening the next one. I should mention that you've defined the root formatting as "color:dark_gray,bold:true", but repeated that in one of the children. Since the parent already has that, all children will inherit it, meaning you don't need to repeat it (and also allowing you to do a simple quoted string rather than a full component). Fixed command:
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/
You do not need to escape the quotation marks at all since no nesting is occurring:
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 use this nearly everyday for command reference, but I never really posted on it.
Don't thank me just press the green upward arrow.
The answer to the universe.
You can use the line break character "\n" to skip to a new line:
Origins are present for all commands, so it's a fairly spread out topic. For clarity, I can add a section on the end to provide a general idea of how origins in most commands work, as well as signs and books.
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/
This is well beyond the scope of what is capable in vanilla.
EDIT: I've added an "Origins" section to describe a general usage as well as specific to /tellraw, /title, books, and signs.
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 "selector" tag must be used, since raw text does not parse player selectors:
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/
|..|. X .. X .|..| |..|. O_o .|..|
PS - Do you keep this updated with new releases?
I'm assuming so, based on all the posts about additions, & all, but wanted to make 100% sure.
Thanks again,
:3:Mr.J
I do keep it updated, yes! If somebody mentions something new I take a look into it and modify the post where needed. Nothing new so far concerning JSON since 1.8's been completed, but hopefully we'll get some goodies in 1.9. The main thing to look out for is JSON support in all displayed string tags, such as "Lore" and "Name" for items, and "CustomName" for entities.
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/
EDIT: Oh and also how do you add another line of text?
/summon Zombie ~ ~ ~ {CustomName:"{selector:@a}"}
? Thanks in advance
I want to add new lines of text too. I saw something on the minecraft wiki with \n makes a new line (Essentially presses enter) but I don't know how to use it.
Where did you get the commands.clone.success string?
I would like something like this:
/tellraw @p ["Press",{translate:just.my.example.rightclick}," to use."]
Using signs will allow you to circumvent the OP requirement, so /trigger will not be necessary for that.
\n is to be inserted directly into the text:
No; the "CustomName" tag does not currently support JSON, though in the future most (if not all) string tags should support it. No idea when that will be, but it will solve that issue if it does get implemented into "CustomName".
You can find the list of available translations for English in the version jar, under "assets\minecraft\lang".
You need to further escape the quotation marks. The first \" within the NBT data will close the "value" tag early, causing a syntax error. The formula for figuring out how many backslashes you need is: ([current depth] * 2) + 1
Since you're now at depth 1 (the previous depth being 0), you need 3 backslashes:
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/
Not in vanilla unfortunately. The newline character cannot be used in /title.
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/
Thats a bit unfortunate. Hopefully they add it in the future. I can see it making the title command quite a bit more useful.
Im not sure if im doing it wrong or something but if anyone could help me that would be great
You need to use the Text1, Text2, Text3, and Text4 tags for each line on the sign:
You can find the NBT structure for signs themselves here: http://minecraft.gamepedia.com/Chunk_format#Block_entity_format
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/