Add SWCommand.register
Dieser Commit ist enthalten in:
Ursprung
07f401c2e1
Commit
173361e1be
@ -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 {
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren