-1

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.

pppery
  • 3,876
  • 8
  • 27
  • 47
gamer103
  • 343
  • 3
  • 21

2 Answers2

0

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!

GoldNugget8
  • 259
  • 1
  • 3
  • 14
  • sorry. i wasn't very clear when i made my question. what i meant is when the person clicks on the /tellraw thing it activates 5 setblock commands relative to the players cordinates. – gamer103 Apr 03 '16 at 19:48
  • Can you please show the command you are using in the question? – GoldNugget8 Apr 04 '16 at 14:31
0

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:

.
Rik Schaaf
  • 101
  • 1