Actually that's not true, /tellraw uses a completely different method of showing text. Also, formatting codes aren't used in this, so that's irrelevant.
The extra thing is a list of items, each have their own formatting, and are COMPLETELY separate from other items. Try it for yourself.
[edit] To back up my post, here's a command I use as a greeter:
One line (for copy paste to try it):
/tellraw @a[score_greeter_min=1,score_greeter=1] {text:'Welcome to the ', extra:[{text:'Island Survival Games', color:red}, {text:'! Read the books in your inventory for '},{text:'Information about the Survival Games', color:green}, {text:', '}, {text:'Features of the Island Survival Games', color:aqua}, {text:', and if you\'ve read the Hunger Games book or seen the film (or just like reading stories) '},{text:'Lore behind the Island Survival Games', color:yellow}, {text:'!'}]}
Multi line:
/tellraw @a[score_greeter_min=1,score_greeter=1]
{
text:'Welcome to the ',
extra:[
{
text:'Island Survival Games',
color:red
},{
text:'! Read the books in your inventory for '
},{
text:'Information about the Survival Games',
color:green
},{
text:', '
},{
text:'Features of the Island Survival Games',
color:aqua
},{
text:', and if you\'ve read the Hunger Games book or seen the film (or just like reading stories) '
},{
text:'Lore behind the Island Survival Games',
color:yellow
},{
text:'!'
}
]
}
I have modified it since then, but this also works.
I am referring to the formatting codes because they are similar, not stating that they are one in the same. I'm not sure you understand my point; I already know how the 'extra' tag works and that it's separate from other children. I am talking about defaulting the text format back to normal without having to set every bit (bold, italic, strikethrough) to false and the color to white from the parent.
EDIT:
I think I'm seeing your relation to it, though. Using the 'extra' tag WITHOUT having any parent text or formatting would work. Just surprised there wasn't any way to quickly default the formatting away from an existing parent.
EDIT2:
And as a quick example: let's say I have a lot of text that's formatted heavily for whatever reason, and in the middle of it I would like something completely different from the parent:
Instead of having to remove all the formatting in that manner, I was hoping some form of reset would be available, just like in the page I linked earlier.
If we use the 'extra' tags with no parent, it becomes longer than the first method:
Is it possible to have one text execute two commands at once? I've been trying it and so far I've been unsuccessful.
contrary to what Skylinerw has said, by putting 2 clickEvents in the same curly brackets (or whatever you people call these grouping symbols) and have them do whatever you want, like i did here
/tellraw @a {text: "Who wants a ",extra:[{text: "FREE ",color: "red"},{text: "PUPPY",color: "green"},{text: "!?!? "},{text: "[YES]",color: "green",hoverEvent: {action: "show_text",value: "it's a PUPPY!"},clickEvent: {action: "run_command",value: "/say here, moron"},clickEvent: {action: "run_command",value: "/summon Wolf ~ ~ ~ {Angry:1}"}},{text: " | "},{text: "[NO]",color: "red",hoverEvent: {action: "show_text",value: "it could have rabies..."},clickEvent: {action: "run_command",value: "/say jerk..."}}]}
contrary to what Skylinerw has said, by putting 2 clickEvents in the same curly brackets (or whatever you people call these grouping symbols) and have them do whatever you want, like i did here
/tellraw @a {text: "Who wants a ",extra:[{text: "FREE ",color: "red"},{text: "PUPPY",color: "green"},{text: "!?!? "},{text: "[YES]",color: "green",hoverEvent: {action: "show_text",value: "it's a PUPPY!"},clickEvent: {action: "run_command",value: "/say here, moron"},clickEvent: {action: "run_command",value: "/summon Wolf ~ ~ ~ {Angry:1}"}},{text: " | "},{text: "[NO]",color: "red",hoverEvent: {action: "show_text",value: "it could have rabies..."},clickEvent: {action: "run_command",value: "/say jerk..."}}]}
FYI, your example does not work. Only one clickEvent is used, and it's always the one that comes last.
EDIT:
To clarify, you have it set to both /say "here, moron" and to /summon a wolf. The /summon works because it comes last, but the /say does nothing. It should help to test your command before posting, even if you're sure.
Is it possible for a /tellraw command to activate another /tellraw command by clicking on the text in the chat?
Yes, but the length of the command typically becomes too great. Commands run from the /tellraw command are run as if the player typed them. While command blocks don't have a character limit Command blocks have a character limit of 16,369, while players have a limit of 100. If the command is too long, the player will be kicked off the world/server.
FYI, your example does not work. Only one clickEvent is used, and it's always the one that comes last.
EDIT:
To clarify, you have it set to both /say "here, moron" and to /summon a wolf. The /summon works because it comes last, but the /say does nothing. It should help to test your command before posting, even if you're sure.
huh, i could swear it worked. oh well, back to experimenting
Hello!
I've got a problem. Looks like it's impossible to "nest" tellraw commands. I've tried as follows:
/tellraw @p
{
"text":"What do you need?",
"extra":
[
{
"text":"[I need help!]",
"color":"green",
"clickEvent":
{
"action":"run_command",
"value":"/tellraw @p {"text":"I shall help you!","color":"aqua"}"
}
}
]
}
But there was no output in chat; Command block gave an error: "That player cannot be found"
What does it mean?
Quotation marks within quotation marks must be escaped, otherwise the code thinks the command is ending before it should. You can escape using a backslash, or choose to use singular quotation marks instead. As well, you have a large amount of unnecessary quotation marks.
Here's a fix using backslashes:
/tellraw @p {
text:"What do you need?",
extra:[
{
text:"[I need help!]",
color:green,
clickEvent:{
action:run_command,
value:"/tellraw @p {text:\"I shall help you!\",color:aqua}"
}
}
]
}
And here's a fix using singular quotation marks:
/tellraw @p {
text:"What do you need?",
extra:[
{
text:"[I need help!]",
color:green,
clickEvent:{
action:run_command,
value:"/tellraw @p {text:'I shall help you!',color:aqua}"
}
}
]
}
Keep in mind that there's also a character limit within the "value". So if you have a long /tellraw within the "value", the player will be kicked from the world due to the character length. There's a bug report for that here: https://mojang.atlassian.net/browse/MC-30955
IS there a way to run a clickaction and a hover event on the same text?
For example
A text that says [STR] and it does an action when clicked, and also has a hover event saying that this stats will "increase your damage"
Rollback Post to RevisionRollBack
Here is my simpe Paint application in Minecraft.
Above is my old 2011 project that I liked, I don't play that much minecraft anymore but I occasionally help out on the Redstone forum. Hope my answers can be of help, let me know if I am unclear, and a +REP would be nice for me.
IS there a way to run a clickaction and a hover event on the same text?
For example
A text that says [STR] and it does an action when clicked, and also has a hover event saying that this stats will "increase your damage"
Yes:
/tellraw @a {
text:"[STR]",
clickEvent:{
action:run_command,
value:"/say some command"
},
hoverEvent:{
action:show_text,
value:"This will increase your damage"
}
}
EDIT:
If it's nested in an extra tag, just keep it in the same nest as the "text", like so:
/tellraw @a {
text:"",
extra:[
{
text:"[STR]",
clickEvent:{
action:run_command,
value:"/say some command"
},
hoverEvent:{
action:show_text,
value:"This will increase your damage"
}
},
{
text:"[STA]",
clickEvent:{
action:run_command,
value:"/say some command"
},
hoverEvent:{
action:show_text,
value:"This will increase your health"
}
}
]
}
For anyone who wants to activate multiple commands with one click in /tellraw, here's one way to do it:
/tellraw @p {text:"Get a sword and a shovel!",clickEvent:{action:run_command,value:"/setblock 0 64 0 redstone_block"}}
(You can replace 0 64 0 with whatever coordinates you want.)
One block below the location of the redstone block when you click on the text, put a command block that says:
setblock ~ ~1 ~ air
Then around the place the redstone block is, put command blocks that do what you want:
For anyone who wants to activate multiple commands with one click in /tellraw, here's one way to do it:
/tellraw @p {text:"Get a sword and a shovel!",clickEvent:{action:run_command,value:"/setblock 0 64 0 redstone_block"}}
(You can replace 0 64 0 with whatever coordinates you want.)
One block below the location of the redstone block when you click on the text, put a command block that says:
setblock ~ ~1 ~ air
Then around the place the redstone block is, put command blocks that do what you want:
give @p iron_sword
give @p iron_shovel
Of course, you can use any commands you want.
Instead of using /setblock for air, if you use the replace method of "Destroy" for the redstone block in the /tellraw command, it will pulse the command blocks:
Instead of using /setblock for air, if you use the replace method of "Destroy" for the redstone block in the /tellraw command, it will pulse the command blocks:
/setblock X Y Z redstone_block 0 destroy
Oh good to know, more to learn from SkylinerW, That's how I handled the RPG system stat's distribution.
Had a bit of trouble getting that part stuck when someone spamed the /setblock, but this fixes it
Here is my simpe Paint application in Minecraft.
Above is my old 2011 project that I liked, I don't play that much minecraft anymore but I occasionally help out on the Redstone forum. Hope my answers can be of help, let me know if I am unclear, and a +REP would be nice for me.
Instead of using /setblock for air, if you use the replace method of "Destroy" for the redstone block in the /tellraw command, it will pulse the command blocks:
/setblock X Y Z redstone_block 0 destroy
I guess that works too. But is there a reason why that is better?
I guess that works too. But is there a reason why that is better?
Just to lessen the number of command blocks needed. If you intend on powering redstone with this method, it won't work; you'd have to use your method instead. But if it's just to power a couple command blocks, setting to "destroy" doesn't hurt.
I have been reading the forums and cannot find any refference to it, and since it seems there are some very knowledgable people here, i would like to ask a question.
Is there a way to display the value of a scoreboard objective in text using the tellraw command? i.e "The balance of your account is: __" where the "__" is the value stored in the scoreboard objective?
I have been reading the forums and cannot find any refference to it, and since it seems there are some very knowledgable people here, i would like to ask a question.
Is there a way to display the value of a scoreboard objective in text using the tellraw command? i.e "The balance of your account is: __" where the "__" is the value stored in the scoreboard objective?
Sadly, the only way this has ever been possible is to have one command block for every possible score. Even 1.7 hasn't introduced anything to help with this complication.
It's a bit difficult. Instead of using the /give command, you would want to use the /setblock command. You'd use it to place a redstone torch or block next to an already-existing command block that has the /give command. Then the command block won't go off anymore because it's being locked in the on state.
Currently there doesn't seem to be a way to have multiple commands per /tellraw.
you could make it beside a redstone line that executes commands, one of which is a setblock command that turns the redstone block into an air block
you could make it beside a redstone line that executes commands, one of which is a setblock command that turns the redstone block into an air block
Yes, this is the typical work-around. But doing so gives up the ability to execute certain commands relative to the player, such as /summon, so it's sadly not a solution for every tellraw.
13w37a
YES
I am referring to the formatting codes because they are similar, not stating that they are one in the same. I'm not sure you understand my point; I already know how the 'extra' tag works and that it's separate from other children. I am talking about defaulting the text format back to normal without having to set every bit (bold, italic, strikethrough) to false and the color to white from the parent.
EDIT:
I think I'm seeing your relation to it, though. Using the 'extra' tag WITHOUT having any parent text or formatting would work. Just surprised there wasn't any way to quickly default the formatting away from an existing parent.
EDIT2:
And as a quick example: let's say I have a lot of text that's formatted heavily for whatever reason, and in the middle of it I would like something completely different from the parent:
Notice:
bold:false,
italic:false,
underlined:false
Instead of having to remove all the formatting in that manner, I was hoping some form of reset would be available, just like in the page I linked earlier.
If we use the 'extra' tags with no parent, it becomes longer than the first method:
I'm not saying it's significant to have a form of reset, just that it may be easier and could shrink down the amount of characters in the 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/
contrary to what Skylinerw has said, by putting 2 clickEvents in the same curly brackets (or whatever you people call these grouping symbols) and have them do whatever you want, like i did here
want a (fast) reply? Quote me!
FYI, your example does not work. Only one clickEvent is used, and it's always the one that comes last.
EDIT:
To clarify, you have it set to both /say "here, moron" and to /summon a wolf. The /summon works because it comes last, but the /say does nothing. It should help to test your command before posting, even if you're sure.
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/
Yes, but the length of the command typically becomes too great. Commands run from the /tellraw command are run as if the player typed them.
While command blocks don't have a character limitCommand blocks have a character limit of 16,369, while players have a limit of 100. If the command is too long, the player will be kicked off the world/server.I recommend upvoting the bug report here: https://mojang.atlassian.net/browse/MC-30955
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/
huh, i could swear it worked. oh well, back to experimenting
want a (fast) reply? Quote me!
Quotation marks within quotation marks must be escaped, otherwise the code thinks the command is ending before it should. You can escape using a backslash, or choose to use singular quotation marks instead. As well, you have a large amount of unnecessary quotation marks.
Here's a fix using backslashes:
And here's a fix using singular quotation marks:
Keep in mind that there's also a character limit within the "value". So if you have a long /tellraw within the "value", the player will be kicked from the world due to the character length. There's a bug report for that here: https://mojang.atlassian.net/browse/MC-30955
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/
For example
A text that says [STR] and it does an action when clicked, and also has a hover event saying that this stats will "increase your damage"
Above is my old 2011 project that I liked, I don't play that much minecraft anymore but I occasionally help out on the Redstone forum. Hope my answers can be of help, let me know if I am unclear, and a +REP would be nice for me.
Yes:
EDIT:
If it's nested in an extra tag, just keep it in the same nest as the "text", like so:
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 replace 0 64 0 with whatever coordinates you want.)
One block below the location of the redstone block when you click on the text, put a command block that says:
Then around the place the redstone block is, put command blocks that do what you want:
Of course, you can use any commands you want.
Instead of using /setblock for air, if you use the replace method of "Destroy" for the redstone block in the /tellraw command, it will pulse the command blocks:
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/
Oh good to know, more to learn from SkylinerW, That's how I handled the RPG system stat's distribution.
Had a bit of trouble getting that part stuck when someone spamed the /setblock, but this fixes it
Above is my old 2011 project that I liked, I don't play that much minecraft anymore but I occasionally help out on the Redstone forum. Hope my answers can be of help, let me know if I am unclear, and a +REP would be nice for me.
I guess that works too. But is there a reason why that is better?
Just to lessen the number of command blocks needed. If you intend on powering redstone with this method, it won't work; you'd have to use your method instead. But if it's just to power a couple command blocks, setting to "destroy" doesn't hurt.
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 a way to display the value of a scoreboard objective in text using the tellraw command? i.e "The balance of your account is: __" where the "__" is the value stored in the scoreboard objective?
Sadly, the only way this has ever been possible is to have one command block for every possible score. Even 1.7 hasn't introduced anything to help with this complication.
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 could make it beside a redstone line that executes commands, one of which is a setblock command that turns the redstone block into an air block
Yes, this is the typical work-around. But doing so gives up the ability to execute certain commands relative to the player, such as /summon, so it's sadly not a solution for every tellraw.
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 do a command like this and these little thing pops up replacing the space's.
Can you Please Help me With This Problem
It kinda looks like æ in a box.
Thx
Willsg1234