SteamWar/SpigotCore
Archiviert
13
0

Add SWCommand.ClassMapper.local

Dieser Commit ist enthalten in:
yoyosource 2021-03-30 16:27:20 +02:00
Ursprung 314120a01f
Commit c1e7fdbb1d

Datei anzeigen

@ -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;
}
}