diff --git a/SpigotCore_Main/src/de/steamwar/command/SWCommand.java b/SpigotCore_Main/src/de/steamwar/command/SWCommand.java index 5488b18..d1bcdb1 100644 --- a/SpigotCore_Main/src/de/steamwar/command/SWCommand.java +++ b/SpigotCore_Main/src/de/steamwar/command/SWCommand.java @@ -79,7 +79,7 @@ public abstract class SWCommand { }); for (Method method : getClass().getDeclaredMethods()) { - addMapper(Mapper.class, method, i -> i != 0, false, TypeMapper.class, (anno, typeMapper) -> { + addMapper(Mapper.class, method, i -> i == 0, false, TypeMapper.class, (anno, typeMapper) -> { if (anno.local()) { localTypeMapper.put(anno.value(), typeMapper); } else { @@ -89,7 +89,7 @@ public abstract class SWCommand { addMapper(ClassMapper.class, method, i -> i != 0, false, TypeMapper.class, (anno, typeMapper) -> { SWCommandUtils.addMapper(anno.value().getTypeName(), typeMapper); }); - add(Register.class, method, i -> i != 2, true, null, (anno, parameters) -> { + add(Register.class, method, i -> i == 2, true, null, (anno, parameters) -> { if (!anno.help()) { return; } @@ -103,7 +103,7 @@ public abstract class SWCommand { }); } for (Method method : getClass().getDeclaredMethods()) { - add(Register.class, method, i -> i == 0, true, null, (anno, parameters) -> { + add(Register.class, method, i -> i > 0, true, null, (anno, parameters) -> { if (anno.help()) { return; } @@ -135,7 +135,7 @@ public abstract class SWCommand { } Parameter[] parameters = method.getParameters(); - if (parameterTester.test(parameters.length)) { + if (!parameterTester.test(parameters.length)) { return; } if (firstParameter && !CommandSender.class.isAssignableFrom(parameters[0].getType())) {