spigot multi arg command

Solutions on MaxInterview for spigot multi arg command by the best coders in the world

showing results for - "spigot multi arg command"
Amélie
20 Jul 2019
1public class CommandName implements CommandExecutor {
2	@Override
3    public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
4		if (args.length < 1) {
5			Util.sendtoplayer((Player) sender, "$cInvalid amount of args");
6		}
7		if (args[0].equals("subcommandname")) {
8			//do stuff
9		} else if (args[0].equals("othersubcommandname")) {
10			//do more things
11		}
12        return true;
13    }
14}