From 4ded1832b99c1dd941529cac9cffb4f164844501 Mon Sep 17 00:00:00 2001 From: Rsl1122 Date: Sat, 7 Dec 2019 14:56:12 +0200 Subject: [PATCH] Added 'not enough args' for '/plan register' Previously a no permission message was displayed. --- .../djrapitops/plan/commands/subcommands/RegisterCommand.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Plan/common/src/main/java/com/djrapitops/plan/commands/subcommands/RegisterCommand.java b/Plan/common/src/main/java/com/djrapitops/plan/commands/subcommands/RegisterCommand.java index 153e70488..fcbe57536 100644 --- a/Plan/common/src/main/java/com/djrapitops/plan/commands/subcommands/RegisterCommand.java +++ b/Plan/common/src/main/java/com/djrapitops/plan/commands/subcommands/RegisterCommand.java @@ -101,6 +101,10 @@ public class RegisterCommand extends CommandNode { return; } + if (args.length < 1) { + throw new IllegalArgumentException(locale.getString(CommandLang.FAIL_REQ_ARGS, 1, Arrays.toString(getArguments()))); + } + if (CommandUtils.isPlayer(sender)) { playerRegister(args, sender); } else {