diff --git a/SpigotCore_Main/src/de/steamwar/command/SWCommand.java b/SpigotCore_Main/src/de/steamwar/command/SWCommand.java index cbfe7a1..7260a41 100644 --- a/SpigotCore_Main/src/de/steamwar/command/SWCommand.java +++ b/SpigotCore_Main/src/de/steamwar/command/SWCommand.java @@ -70,7 +70,7 @@ public abstract class SWCommand { } strings = new ArrayList<>(strings); for (int i = strings.size() - 1; i >= 0; i--) { - if (!strings.get(i).startsWith(args[args.length - 1])) { + if (!strings.get(i).toLowerCase().startsWith(args[args.length - 1].toLowerCase())) { strings.remove(i); } } diff --git a/SpigotCore_Main/src/de/steamwar/command/SWCommandUtils.java b/SpigotCore_Main/src/de/steamwar/command/SWCommandUtils.java index 7fe7f41..f44b891 100644 --- a/SpigotCore_Main/src/de/steamwar/command/SWCommandUtils.java +++ b/SpigotCore_Main/src/de/steamwar/command/SWCommandUtils.java @@ -104,7 +104,7 @@ public class SWCommandUtils { Object[] arguments = new Object[parameters.length + 1]; int index = 0; while (index < subCommand.length) { - if (!args[index].equals(subCommand[index])) { + if (!args[index].equalsIgnoreCase(subCommand[index])) { throw new CommandParseException(); } index++; @@ -115,9 +115,7 @@ public class SWCommandUtils { arguments[arguments.length - 1] = varArgument; } else { for (int i = 0; i < parameters.length - (varArgType != null ? 1 : 0); i++) { - System.out.println(index); arguments[i + 1] = parameters[i].map(args[index]); - System.out.println(arguments[i + 1]); index++; if (arguments[i + 1] == null) { throw new CommandParseException(); diff --git a/SpigotCore_Main/src/de/steamwar/command/SubCommand.java b/SpigotCore_Main/src/de/steamwar/command/SubCommand.java index e4229b6..4742ff2 100644 --- a/SpigotCore_Main/src/de/steamwar/command/SubCommand.java +++ b/SpigotCore_Main/src/de/steamwar/command/SubCommand.java @@ -108,7 +108,7 @@ class SubCommand { for (String value : subCommand) { String s = argsList.remove(0); if (argsList.isEmpty()) return Collections.singletonList(value); - if (!value.equals(s)) return null; + if (!value.equalsIgnoreCase(s)) return null; } for (TypeMapper argument : arguments) { String s = argsList.remove(0);