diff --git a/SpigotCore_Main/src/de/steamwar/command/SWCommand.java b/SpigotCore_Main/src/de/steamwar/command/SWCommand.java index 47b6971..51353a9 100644 --- a/SpigotCore_Main/src/de/steamwar/command/SWCommand.java +++ b/SpigotCore_Main/src/de/steamwar/command/SWCommand.java @@ -77,7 +77,7 @@ public abstract class SWCommand { return strings; } }; - SWCommandUtils.commandMap.register("steamwar", this.command); + register(); for (Method method : getClass().getDeclaredMethods()) { addMapper(Mapper.class, method, i -> i == 0, false, TypeMapper.class, (anno, typeMapper) -> { @@ -176,6 +176,10 @@ public abstract class SWCommand { command.unregister(SWCommandUtils.commandMap); } + protected void register() { + SWCommandUtils.commandMap.register("steamwar", this.command); + } + @Retention(RetentionPolicy.RUNTIME) @Target({ElementType.METHOD}) protected @interface Register {