multiple /tellraw reactions from same command [duplicate]

multiple /tellraw reactions from same command [duplicate] - Unrecognizable woman holding paw of dog

I'm trying to make something and I want a /tellraw to activate and when the player clicks on it multiple things happen. What I mean is when they click on the text like 5 /setblock commands activate. I can't figure out how do do this. I have tried just putting multiple clickEvents in but it does not work. Is this even possible?

I'm playing Minecraft 1.7.10.



Best Answer

Well, seeing as you are on 1.7.10 I would say the easiest way is to make the /tellraw command activate a /setblock command that puts a redstone block in an area that activates the five command blocks. Yes, it's that simple. I used to use this when I was trying to make a map back in 1.7.10 all the time! This is the easiest way to do it in 1.7.10 from what I know. I hope this helps!




Pictures about "multiple /tellraw reactions from same command [duplicate]"

multiple /tellraw reactions from same command [duplicate] - Composition of different conchs on beige table
multiple /tellraw reactions from same command [duplicate] - Top view composition of shells assorted sizes arranged randomly on beige surface
multiple /tellraw reactions from same command [duplicate] - Closeup of red metal bottle cap placed on glass bottle with water droplets on white background





Why Sudo Is The Best Command in Minecraft




More answers regarding multiple /tellraw reactions from same command [duplicate]

Answer 2

Are you the owner of the server, does it run bukkit and do you know how to write Java? If all of the above are yes, I think it would be easiest to create a small plugin that achieves this. If you don't, the best is to look at the other answers.

It is very easy to create a command listener that dispatches more commands when it activates. You can then use a /tellraw to call this command. Here is some example code:

package my.pkg;

import org.bukkit.Bukkit;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.plugin.java.JavaPlugin;

public class MyPlugin extends JavaPlugin {

    @Override
    public boolean onCommand(CommandSender sender, Command command, String alias, String[] args) {
        if (command.getName().equalsIgnoreCase("mycommand")) {
            Bukkit.dispatchCommand(sender, "command1");
            Bukkit.dispatchCommand(sender, "command2 with arguments");
            Bukkit.dispatchCommand(sender, "command3");
        }
    }
}

What this code does is listen for /mycommand. If someone does this command (by clicking a link from a /tellraw message for example), the code will automatically fire the commands /command1, /command2 with arguments and /command3. These commands can be any command, like the /setblock you mentioned.

For more information on creating plugins, here is a (slightly older, but still viable) video:

.

Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.

Images: Ivan Babydov, Karolina Grabowska, Karolina Grabowska, Karolina Grabowska