I've started making my custom map and I have found this particular post very nutritious as well inspiring!!
But I'm in a pickle-- I do not understand what is wrong with a command-block command to give a written book with a newline in it?!?!? This doesn't work:
give @p written_book 1 0 {title:"It",author:"Me",pages:["Hello\n\"you\"","there"]}
I wind up with...
Hello\n"you"
...on the fist page and "there" on the second. The second page is perfectly peachy fine. What I need on the first page is:
Hello
"you"
I think that I am missing something either tragically incorrect or facing an esoteric weirdness, "you" there Simply using "\n" isn't working directly.
EDIT: I'm using vanilla 1.8 as officially released...
It seems you'll be required to use the "text" tag instead of regular text. It appears this is specific to books as well, as \n in regular text with /tellraw functions just fine. I'll be sure to add that bit to the OP:
The first one don't gives me the item, and the second one say this when i click on the click event: "Invalid json: unterminated string at line 1 column 89"
Sry for my bad english.
I think there is a problem with using own trasnlate strings from server resource packs. If player have no translation then he will see gilberish instead of desired text.
I see no solution at the moment. Servers are not able to force players to download resource packs. Server are not able to check if resource pack is present or not. And there is no way to show a fallback string in case of a missing resource. Please correct me if I'm wrong.
The first one don't gives me the item, and the second one say this when i click on the click event: "Invalid json: unterminated string at line 1 column 89"
Sry for my bad english.
Your first one needs to have nested quotes escaped with the backslash character. What's happening is the very first quote within the JSON is ending the page itself, and the rest of the data is out of place and throws an error. The second problem is your clickEvent running a /tellraw command. The commands run through the clickEvent are run as if the player themselves typed it and ran it, meaning they are restricted to a character limit of 100 (which is the problem with your second command). I did manage to reduce the number of characters enough by removing unneeded quotes and restructuring the command. Full fixed:
I think there is a problem with using own trasnlate strings from server resource packs. If player have no translation then he will see gilberish instead of desired text.
I see no solution at the moment. Servers are not able to force players to download resource packs. Server are not able to check if resource pack is present or not. And there is no way to show a fallback string in case of a missing resource. Please correct me if I'm wrong.
I've run into this as well, and unfortunately there's no way to simply detect a missing resource pack. What I could recommend is the "multiplayer.texturePrompt.line1" line and force them on the screen using /title for players. In the resource pack, change this line to blank:
multiplayer.texturePrompt.line1=
So that the message is still issued, but players won't see anything on their screen if they have the resource pack enabled. Message otherwise:
multiplayer.texturePrompt.line1=This server recommends the use of a custom resource pack.
A new "action" for clickEvents has been added called "change_page". It allows you to have the player click on text within a book, and be taken to a specified page number. Naturally this means "change_page" is exclusive to books. Values are literal, 1 standing for page 1, rather than starting at 0 for page 1. Example command, where clicking on "Click." will take you to the second page:
/give @a minecraft:written_book 1 0 {title:"",author:"",pages:["{text:\"Click.\",clickEvent:{action:change_page,value:2}}","The second page."]}
So this allows for useful index pages, though personally I don't see much application beyond that (besides "choose your own adventure" books).
You had closed the "extra" tag with a curly bracket rather that square, and closed the dataTags themselves with square instead of curly. The page itself didn't have its closing quotation mark. Fixed command:
/give @p minecraft:written_book 1 0 {title:"TP book",author:"Minigames",pages:["{text:\"MiniGames: \",color:red,extra:[{text:\"\FFA \",color:dark_red,hoverEvent:{action:show_text,value:\"Free for all (fist fight)\"},clickEvent:{action:run_command,value:\"/the command\"}},{text:\"\RP \",color:purple,hoverEvent:{action:show_text,value:\"Rainbow Parkour\"},clickEvent:{action:run_command,value:\"/the command\"}}]}"]}
/give @p minecraft:written_book 1 0 {title:"TP book",author:"Minigames",pages:["{text:\"MiniGames: \",color:black,extra:[{text:\"\FFA \",color:dark_red,hoverEvent:{action:show_text,value:\"Free for all (fist fight)\"},clickEvent:{action:run_command,value:\"/tp @p 329 74 -282 \"}},{text:\"\RP \",color:blue,hoverEvent:{action:show_text,value:\"Rainbow Parkour\"},clickEvent:{action:run_command,value:\"/tp @p 256 97 -313\"}}[{text:\"\NP\",color:green,hoverEvent:{action:show_text,value:\"Normal Parkour\"},clickEvent:{action:run_command,value:\"/say test \"}}]}"]}
This is my last post here obviously
Just missing a comma before your last text, with a stray square bracket in its place. You also have some misplaced backslashes in some of the texts (such as \NP for Normal Parkour, in which \n inserts a newline). Fixed command:
/give @p minecraft:written_book 1 0 {title:"TP book",author:"Minigames",pages:["{text:\"MiniGames: \",color:black,extra:[{text:\"FFA \",color:dark_red,hoverEvent:{action:show_text,value:\"Free for all (fist fight)\"},clickEvent:{action:run_command,value:\"/tp @p 329 74 -282 \"}},{text:\"RP \",color:blue,hoverEvent:{action:show_text,value:\"Rainbow Parkour\"},clickEvent:{action:run_command,value:\"/tp @p 256 97 -313\"}},{text:\"NP\",color:green,hoverEvent:{action:show_text,value:\"Normal Parkour\"},clickEvent:{action:run_command,value:\"/say test \"}}]}"]}
/tellraw @a ["{\"text\":\"\",\"extra\":[{\"text\":\"A \",\"color\":\"gold\",\"strikethrough\":\"true\"},{\"text\":\"Herobrine\"},{\"text\":\"'s\",\"color\":\"gold\"},{\"text\":\" Guard\",\"color\":\"black\",\"bold\":\"true\"},{\"text\":\" has been summoned!\",\"color\":\"gold\"}]}"]
I need them for a map I'm making! I used the following website to generate the tellraw. Please explain why it doesn't work: http://minecraftjson.com/ (previously known as ezekielelin.com/tellraw/ )
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:
/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\"}]}"]
I need them for a map I'm making! I used the following website to generate the tellraw. Please explain why it doesn't work: http://minecraftjson.com/ (previously known as ezekielelin.com/tellraw/ )
Does no one know how to fix this? It's in a command block.
But I'm in a pickle-- I do not understand what is wrong with a command-block command to give a written book with a newline in it?!?!? This doesn't work:
"you"
EDIT: I'm using vanilla 1.8 as officially released...
It seems you'll be required to use the "text" tag instead of regular text. It appears this is specific to books as well, as \n in regular text with /tellraw functions just fine. I'll be sure to add that bit to the OP:
For a less crazily-escaped command:
And an example with /tellraw, where the original method works:
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 don't know what is wrong in this command:
or wit this:
The first one don't gives me the item, and the second one say this when i click on the click event: "Invalid json: unterminated string at line 1 column 89"
Sry for my bad english.
I see no solution at the moment. Servers are not able to force players to download resource packs. Server are not able to check if resource pack is present or not. And there is no way to show a fallback string in case of a missing resource. Please correct me if I'm wrong.
You cannot, both the title and subtitle are restricted to a single line.
Your first one needs to have nested quotes escaped with the backslash character. What's happening is the very first quote within the JSON is ending the page itself, and the rest of the data is out of place and throws an error. The second problem is your clickEvent running a /tellraw command. The commands run through the clickEvent are run as if the player themselves typed it and ran it, meaning they are restricted to a character limit of 100 (which is the problem with your second command). I did manage to reduce the number of characters enough by removing unneeded quotes and restructuring the command. Full fixed:
I've run into this as well, and unfortunately there's no way to simply detect a missing resource pack. What I could recommend is the "multiplayer.texturePrompt.line1" line and force them on the screen using /title for players. In the resource pack, change this line to blank:
So that the message is still issued, but players won't see anything on their screen if they have the resource pack enabled. Message otherwise:
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/
So this allows for useful index pages, though personally I don't see much application beyond that (besides "choose your own adventure" 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/
You had closed the "extra" tag with a curly bracket rather that square, and closed the dataTags themselves with square instead of curly. The page itself didn't have its closing quotation mark. 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/
Just missing a comma before your last text, with a stray square bracket in its place. You also have some misplaced backslashes in some of the texts (such as \NP for Normal Parkour, in which \n inserts a newline). 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/
invalid json: use jsonreader.setlenient(true) to accept malformed json at line 1 column 8
plz help!
You have to provide the exact command you're using.
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\":\"\",\"extra\":[{\"text\":\"===================================\",\"color\":\"dark_green\",\"bold\":\"true\",\"strikethrough\":\"true\"}]}"]
And:
/tellraw @a ["{\"text\":\"\",\"extra\":[{\"text\":\"A \",\"color\":\"gold\",\"strikethrough\":\"true\"},{\"text\":\"Herobrine\"},{\"text\":\"'s\",\"color\":\"gold\"},{\"text\":\" Guard\",\"color\":\"black\",\"bold\":\"true\"},{\"text\":\" has been summoned!\",\"color\":\"gold\"}]}"]
I need them for a map I'm making! I used the following website to generate the tellraw. Please explain why it doesn't work: http://minecraftjson.com/ (previously known as ezekielelin.com/tellraw/ )
(Also I know this post is not the right place, I'm sorry for that)
I can't find any problems, but this error pops up:
Invalid json: Expected name at line 1 column 257
PLEASE HELP ME
Does no one know how to fix this? It's in a command block.