Fixes various bugs in commands
This commit is contained in:
@ -22,7 +22,7 @@ public class AddCommand extends TokenizedCommand {
|
||||
public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label,
|
||||
@NotNull String[] args) {
|
||||
super.onCommand(sender, command, label, args);
|
||||
if (args.length < 3) {
|
||||
if (argumentSize < 2) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -34,7 +34,10 @@ public class AddCommand extends TokenizedCommand {
|
||||
sender.sendMessage("You provided an invalid number");
|
||||
return false;
|
||||
}
|
||||
String permission = arguments.get(2);
|
||||
String permission = "";
|
||||
if (argumentSize > 2) {
|
||||
permission = arguments.get(2);
|
||||
}
|
||||
OptionState ignoreCase = OptionState.DEFAULT;
|
||||
OptionState ignoreColor = OptionState.DEFAULT;
|
||||
if (argumentSize > 3) {
|
||||
|
Reference in New Issue
Block a user