I've been tinkering with the new book addition coming to MC 1.8. Though I'm surprised no one has stated or asked, how does one go about page breaks? Or do I have to make a ton of spaces? (Haven't tried additional spaces yet, so I assume it breaks onto another page?)
You'll follow the standard NBT format for list-type tags, in which you separate each list element with a comma:
I'm trying to do a join message for a PvP arena I'm working on, and can't get it quite right. Using this:
It gives me "Invalid json:" in the command block. Anyone know what I'm doing wrong? I want it to end up looking like this:
Playernamehere has joined WarCity!
The command doesn't issue that error for me; are you using 1.8? The "selector" tag is not available in 1.7. As well, whatever text is placed within the "extra" tag will be displayed after the root "text" tag, so the players' name would end up at the end of the message. To fix that, you'd just swap the positions of the tags:
/tellraw @a[r=150] {selector:"@p",extra:[{text:" has joined WarCity!",color:dark_red}]}
I wanted to give myself a written book with some JSON formatting, but for some reason it says "Unbalanced square brackets". I can't seem to find out why. The amount of opening square brackets is equal to the amount of closing square brackets.
Did you type everything by yourself or did you use a program b/c I see a lot of errors
I suggest using http://ezekielelin.com/tellraw/ click on Book on the far right side. Have fun doing this, also if something isn't right contact ezekielelin and he'll help/fix the problem whenever he can.
I am trying to make a slot machine using tellraw but it requires me to nest tellraws for it to work and when I do that it breaks my code.
My command block will run this code
Which will then run this code when clicked
Which will then run this code when clicked
Which will then run this code when clicked
I think it should look like this
but when I run the full code it does not appear. it gives this error
which is usually given with unbalanced brackets (I think)
if some one could help that would be great!
You cannot have more than 100 characters within the "value" tag for running a command. Players clicking on the text are running the commands as if they've typed it in themselves, meaning they are subject to standard chat limitations, being the character limit and requirement of being OP'd to run the command. You will have to use a different method such as /trigger, /scoreboard, /setblock, etc. in order to activate external mechanisms to issue separate /tellraws.
In case you don't know already, the translate argument accepts custom values. This means that you can effectively have different language translations for custom maps within a single download.
You can also add custom variables by adding %s. You can specify a specific entry in the "with" index by adding "#$" before the s, such as %1$s or %3$s.
Aaaaand it doesn't seem to work! Can someone help me? :C
The major difference is the use of the "extra" tag. There must be some form of text at the root alongside the "extra" tag, even if it's blank (which is the solution). The "score" tag in your first command is used as the root text. Your fixed command, in which a blank "text" tag is inserted at the root (also missed a final closing bracket):
You'll follow the standard NBT format for list-type tags, in which you separate each list element with a comma:
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 how I think it should be done but I may be doing it wrong:
/blockdata ~ ~ ~ {Text1:"\"\u2661\"}
(This is only for a single line w/o extras)
Just missing the ending quote for the Text1 tag:
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/
It gives me "Invalid json:" in the command block. Anyone know what I'm doing wrong? I want it to end up looking like this:
Playernamehere has joined WarCity!
The command doesn't issue that error for me; are you using 1.8? The "selector" tag is not available in 1.7. As well, whatever text is placed within the "extra" tag will be displayed after the root "text" tag, so the players' name would end up at the end of the message. To fix that, you'd just swap the positions of the tags:
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/
Thanks though, I'll add it in when 1.8 is released - until then normal say commands for me!
Here is the command:
/give @p written_book 1 0 {title:"Control Panel",author:"",pages:[type=!Player] ~ -500 ~\"}},{text:\"6. Kill Nearby Entities \",bold:false,color:\"red\",clickEvent:{action:run_command,value:\"/tp @e[type=!Player,r=10] ~ -500 ~\"}},{text:\"7. Teleport to Spawn \",bold:false,color:\"blue\",clickEvent:{action:run_command,value:\"/tp @p 0 27 0\"}},{text:\"8. Daytime \",bold:false,color:\"gold\",clickEvent:{action:run_command,value:\"/time set day\"}},{text:\"9. Nighttime \",bold:false,color:\"dark_blue\",clickEvent:{action:run_command,value:\"/time set night\"}},{text:\"10. Clear weather \",bold:false,color:\"aqua\",clickEvent:{action:run_command,value:\"/weather clear 1000000\"}},{text:\"11. Rainy weather \",bold:false,color:\"gray\",clickEvent:{action:run_command,value:\"/weather rain\"}},{text:\"12. Thunderstorm \",bold:false,color:\"dark_gray\",clickEvent:{action:run_command,value:\"/weather thunder\"}}]}","{text:\" Items \",bold:true,extra:[{id:0,lvl:31337},{id:1,lvl:31337},{id:3,lvl:31337},{id:4,lvl:31337},{id:5,lvl:3},{id:6,lvl:41},{id:7,lvl:144}],Unbreakable:1,AttributeModifiers:[{AttributeName:generic.attackDamage,Name:generic.attackDamage,Amount:3,Operation:1,UUIDLeast:89465774,UUIDMost:2872}]}"},clickEvent:{action:run_command,value:\"/give @p diamond_helmet 1 0 {display:{Name:"Helmet of Ultimate Protection"},ench:[{id:0,lvl:31337},{id:1,lvl:31337},{id:3,lvl:31337},{id:4,lvl:31337},{id:5,lvl:3},{id:6,lvl:41},{id:7,lvl:144}],Unbreakable:1,AttributeModifiers:[{AttributeName:generic.attackDamage,Name:generic.attackDamage,Amount:3,Operation:1,UUIDLeast:89465774,UUIDMost:2872}]}}\"}}]}"]}
I suggest using http://ezekielelin.com/tellraw/ click on Book on the far right side. Have fun doing this, also if something isn't right contact ezekielelin and he'll help/fix the problem whenever he can.
A quote from my book: "There are no dumb questions." XP
Here, you'd have to set the value of the run_command to "/tellraw @p/a/r {json stuff}".
.. i think. ;P
EDIT: Whoops, supah long late reply. :<
"Are you falling asleep in the middle of my fascinating explanation?" - Qibli
"I can't even dignify that with a snort." - Winter
"This is important and fascinating!" - Starflight
"You're nonagashabibble." - Squid
My command block will run this code
Which will then run this code when clicked
Which will then run this code when clicked
Which will then run this code when clicked
I think it should look like this
but when I run the full code it does not appear. it gives this error
which is usually given with unbalanced brackets (I think)
if some one could help that would be great!
You cannot have more than 100 characters within the "value" tag for running a command. Players clicking on the text are running the commands as if they've typed it in themselves, meaning they are subject to standard chat limitations, being the character limit and requirement of being OP'd to run the command. You will have to use a different method such as /trigger, /scoreboard, /setblock, etc. in order to activate external mechanisms to issue separate /tellraws.
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 can also add custom variables by adding %s. You can specify a specific entry in the "with" index by adding "#$" before the s, such as %1$s or %3$s.
Putting the CENDENT back in transcendent!
/give @a written_book 1 0 {pages:["{\"text\":\"\",\"extra\":[{\"text\":\"Suicide\n\",\"color\":\"red\",\"bold\":\"true\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"/kill @p\"}},{\"text\":\"Gamemode 1\n\",\"color\":\"green\",\"bold\":\"true\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"/gamemode 1 @p\"},\"hoverEvent\":{\"action\":\"show_text\",\"value\":{\"text\":\"Creative\"}}},{\"text\":\"Gamemode 0\n\",\"color\":\"dark_blue\",\"bold\":\"true\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"/gamemode 0 @p\"},\"hoverEvent\":{\"action\":\"show_text\",\"value\":{\"text\":\"Survival\"}}},{\"text\":\"TOP OF THE WORLD\n\",\"color\":\"dark_gray\",\"bold\":\"true\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"/tp @p ~ 256 ~\"},\"hoverEvent\":{\"action\":\"show_text\",\"value\":{\"text\":\"Make sure your flying\"}}},{\"text\":\"Kill\",\"color\":\"aqua\",\"bold\":\"true\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"/kill @e\"},\"hoverEvent\":{\"action\":\"show_text\",\"value\":{\"text\":\"Including Players\"}}},{\"text\":\" EVERYTHING\n\",\"color\":\"red\",\"bold\":\"true\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"/kill @e\"},\"hoverEvent\":{\"action\":\"show_text\",\"value\":{\"text\":\"Including Players\"}}}]}"],title:Quick Commands,author:Notch}
The major difference is the use of the "extra" tag. There must be some form of text at the root alongside the "extra" tag, even if it's blank (which is the solution). The "score" tag in your first command is used as the root text. Your fixed command, in which a blank "text" tag is inserted at the root (also missed a final closing bracket):
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/