Added 'not enough args' for '/plan register'

Previously a no permission message was displayed.
This commit is contained in:
Rsl1122 2019-12-07 14:56:12 +02:00
parent 10411c0626
commit 4ded1832b9

View File

@ -101,6 +101,10 @@ public class RegisterCommand extends CommandNode {
return; return;
} }
if (args.length < 1) {
throw new IllegalArgumentException(locale.getString(CommandLang.FAIL_REQ_ARGS, 1, Arrays.toString(getArguments())));
}
if (CommandUtils.isPlayer(sender)) { if (CommandUtils.isPlayer(sender)) {
playerRegister(args, sender); playerRegister(args, sender);
} else { } else {