diff --git a/SpigotCore_Main/src/de/steamwar/command/SWCommand.java b/SpigotCore_Main/src/de/steamwar/command/SWCommand.java index 7260a41..0c2f743 100644 --- a/SpigotCore_Main/src/de/steamwar/command/SWCommand.java +++ b/SpigotCore_Main/src/de/steamwar/command/SWCommand.java @@ -88,7 +88,11 @@ public abstract class SWCommand { } }); addMapper(ClassMapper.class, method, i -> i == 0, false, TypeMapper.class, (anno, typeMapper) -> { - SWCommandUtils.addMapper(anno.value().getTypeName(), typeMapper); + if (anno.local()) { + localTypeMapper.put(anno.value().getTypeName(), typeMapper); + } else { + SWCommandUtils.addMapper(anno.value().getTypeName(), typeMapper); + } }); add(Register.class, method, i -> i > 0, true, null, (anno, parameters) -> { if (!anno.help()) { @@ -215,5 +219,7 @@ public abstract class SWCommand { @Target({ElementType.METHOD}) protected @interface ClassMapper { Class value(); + + boolean local() default false; } }