SteamWar/SpigotCore
Archiviert
13
0

Add SWCommand.register

Dieser Commit ist enthalten in:
yoyosource 2021-03-30 10:01:28 +02:00
Ursprung 07f401c2e1
Commit 173361e1be

Datei anzeigen

@ -77,7 +77,7 @@ public abstract class SWCommand {
return strings; return strings;
} }
}; };
SWCommandUtils.commandMap.register("steamwar", this.command); register();
for (Method method : getClass().getDeclaredMethods()) { 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) -> {
@ -176,6 +176,10 @@ public abstract class SWCommand {
command.unregister(SWCommandUtils.commandMap); command.unregister(SWCommandUtils.commandMap);
} }
protected void register() {
SWCommandUtils.commandMap.register("steamwar", this.command);
}
@Retention(RetentionPolicy.RUNTIME) @Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.METHOD}) @Target({ElementType.METHOD})
protected @interface Register { protected @interface Register {