SteamWar/SpigotCore
Archiviert
13
0

CommandFramework3 #94

Manuell gemergt
Zeanon hat 71 Commits von CommandFramework3 nach master 2021-03-30 21:15:40 +02:00 zusammengeführt
Nur Änderungen aus Commit c1e7fdbb1d werden angezeigt - Alle Commits anzeigen

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