Check out example codes for "spigot multi arg command". It will help you in understanding the concepts better.

Code Example 1

public class CommandName implements CommandExecutor {
	@Override
    public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
		if (args.length < 1) {
			Util.sendtoplayer((Player) sender, "$cInvalid amount of args");
		}
		if (args[0].equals("subcommandname")) {
			//do stuff
		} else if (args[0].equals("othersubcommandname")) {
			//do more things
		}
        return true;
    }
}

Learn ReactJs, React Native from akashmittal.com