// Path: src/main/java/de/maxgb/minecraft/second_screen/commands/BaseCommand.java
// public abstract class BaseCommand implements ICommand {
// 	public static void sendMessage(ICommandSender target, String message) {
// 		String[] lines = message.split("\\n");
// 		for (String line : lines) {
//             target.sendMessage(new TextComponentString(line));
//         }
// 
// 	}
// 
// }


import de.maxgb.minecraft.second_screen.commands.BaseCommand;
import net.minecraft.command.CommandException;
import net.minecraft.command.ICommand;
import net.minecraft.command.ICommandSender;
import net.minecraft.server.MinecraftServer;
import net.minecraft.util.math.BlockPos;
import javax.annotation.Nullable;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

	@Override
    public List<String> getAliases() {
        return aliases;
	}

	@Override
    public void execute(MinecraftServer server, ICommandSender sender, String[] args) throws CommandException {
        if (args == null || args.length == 0) {
            BaseCommand.sendMessage(sender, "Usage: " + getUsage(sender));
            return;
		}
		//Tests for the corrosponding subcommand and calls it with the reduced amount of params
		for (MssSubCommand c : commands) {
			if (args[0].equals(c.getCommandName())) {
				String[] var;
				if (args.length == 1) {
					var = null;
				} else {
					var = new String[args.length - 1];
					for (int i = 1; i < args.length; i++) {
						var[i - 1] = args[i];
					}
				}

				c.processCommand(sender, var);
				return;
			}
		}
		if (!args[0].equals("help")) {
// Path: src/main/java/de/maxgb/minecraft/second_screen/commands/BaseCommand.java
// public abstract class BaseCommand implements ICommand {
// 	public static void sendMessage(ICommandSender target, String message) {
// 		String[] lines = message.split("\\n");
// 		for (String line : lines) {
//             target.sendMessage(new TextComponentString(line));
//         }
// 
// 	}
// 
// }


// Path: src/main/java/de/maxgb/minecraft/second_screen/commands/mss_sub/MssCommand.java
import de.maxgb.minecraft.second_screen.commands.BaseCommand;
import net.minecraft.command.CommandException;
import net.minecraft.command.ICommand;
import net.minecraft.command.ICommandSender;
import net.minecraft.server.MinecraftServer;
import net.minecraft.util.math.BlockPos;
import javax.annotation.Nullable;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;


	@Override
    public List<String> getAliases() {
        return aliases;
	}

	@Override
    public void execute(MinecraftServer server, ICommandSender sender, String[] args) throws CommandException {
        if (args == null || args.length == 0) {
            BaseCommand.sendMessage(sender, "Usage: " + getUsage(sender));
            return;
		}
		//Tests for the corrosponding subcommand and calls it with the reduced amount of params
		for (MssSubCommand c : commands) {
			if (args[0].equals(c.getCommandName())) {
				String[] var;
				if (args.length == 1) {
					var = null;
				} else {
					var = new String[args.length - 1];
					for (int i = 1; i < args.length; i++) {
						var[i - 1] = args[i];
					}
				}

				c.processCommand(sender, var);
				return;
			}
		}
		if (!args[0].equals("help")) {
			BaseCommand.sendMessage(sender, "Action not found.");