So I wanted an easy and out-of-the-way way to access commands without needing to type them out fully and go through the process of such for a mild multiplayer server, and without having to hold or use items or blocks to activate any such things.
The context of creating this command is that so players can easily give/take off glowing effect off themselves (so they can show their position to other players easily if they so wanted)
So this (above) is the command that works fine when it's used on it's own, it sends the simple message of Glowing +- and lets me click either button to give or remove glowing. The problem I'm having is trying to get this implimented in a team preffix to have a simple little button ingame give off a private /tellraw that gives even more options for commands
This basic command works fine on it's own, it sends "Hello!" using /say for whoever clicks it for all to see it exclaimed. but when i replace /say Hello! with the /tellraw command in the first spoiler, the command breaks for some reason.
With further testing, I'm completely unable myself to slap /tellraw as a click event run command entirely, I do not understand what the problem is, I don't have understanding of recent command changes and I did not have all that much prior knowledge of json or commands regardless. Can some one help figure out how to get /tellraw to work with click event>run commands?
Then it won't work because the quotes are unbalanced, This Is what Minecraft thinks the quotes are in the above command: (The parts minecraft thinks are quoted are in red)
So I wanted an easy and out-of-the-way way to access commands without needing to type them out fully and go through the process of such for a mild multiplayer server, and without having to hold or use items or blocks to activate any such things.
The context of creating this command is that so players can easily give/take off glowing effect off themselves (so they can show their position to other players easily if they so wanted)
/tellraw @p ["",{"text":"Glowing "},{"text":"+","color":"dark_green","clickEvent":{"action":"run_command","value":"/effect give @p minecraft:glowing 99999 0 true"}},{"text":" ","color":"dark_green"},{"text":"-","color":"dark_red","clickEvent":{"action":"run_command","value":"/effect clear @p minecraft:glowing"}}]
/team modify pink prefix {"text":"Click this!","clickEvent":{"action":"run_command","value":"/say Hello!"}}
So this (above) is the command that works fine when it's used on it's own, it sends the simple message of Glowing +- and lets me click either button to give or remove glowing. The problem I'm having is trying to get this implimented in a team preffix to have a simple little button ingame give off a private /tellraw that gives even more options for commands
/team modify pink prefix {"text":"Click this!","clickEvent":{"action":"run_command","value":"/say Hello!"}}
This basic command works fine on it's own, it sends "Hello!" using /say for whoever clicks it for all to see it exclaimed. but when i replace /say Hello! with the /tellraw command in the first spoiler, the command breaks for some reason.
With further testing, I'm completely unable myself to slap /tellraw as a click event run command entirely, I do not understand what the problem is, I don't have understanding of recent command changes and I did not have all that much prior knowledge of json or commands regardless. Can some one help figure out how to get /tellraw to work with click event>run commands?
Well if you're trying to do this:
/team modify pink prefix {"text":"Click this!","clickEvent":{"action":"run_command","value":"/tellraw @p ["",{"text":"Glowing "},{"text":"+","color":"dark_green","clickEvent":{"action":"run_command","value":"/effect give @p minecraft:glowing 99999 0 true"}},{"text":" ","color":"dark_green"},{"text":"-","color":"dark_red","clickEvent":{"action":"run_command","value":"/effect clear @p minecraft:glowing"}}]"}}
"}}
Then it won't work because the quotes are unbalanced, This Is what Minecraft thinks the quotes are in the above command: (The parts minecraft thinks are quoted are in red)
/team modify pink prefix {"text":"Click this!","clickEvent":{"action":"run_command","value":"/tellraw @p ["",{"text":"Glowing "},{"text":"+","color":"dark_green","clickEvent":{"action":"run_command","value":"/effect give @p minecraft:glowing 99999 0 true"}},{"text":" ","color":"dark_green"},{"text":"-","color":"dark_red","clickEvent":{"action":"run_command","value":"/effect clear @p minecraft:glowing"}}]"}}
"}}
You see the first part is good then minecraft messes it up because it quotes the wrong things.
The Fixed Command:
/team modify pink prefix {"text":"Click this!","clickEvent":{"action":"run_command","value":"/tellraw @p [\"\",{\"text\":\"Glowing \"},{\"text\":\"+\",\"color\":\"dark_green\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"/effect give @p minecraft:glowing 99999 0 true\"}},{\"text\":\" \",\"color\":\"dark_green\"},{\"text\":\"-\",\"color\":\"dark_red\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"/effect clear @p minecraft:glowing\"}}]"}}
"}}
If you have any questions Please reply