Format code [skip actions]

This commit is contained in:
github-actions
2023-09-02 00:33:12 +00:00
Unverified
parent 0db69882a3
commit 717a358636
584 changed files with 1252 additions and 1507 deletions
@@ -26,12 +26,9 @@ public final class QuestSystem extends BaseGameSystem {
}
public void registerHandlers() {
this.registerHandlers(
this.condHandlers, BaseCondition.class);
this.registerHandlers(
this.contHandlers, BaseContent.class);
this.registerHandlers(
this.execHandlers, QuestExecHandler.class);
this.registerHandlers(this.condHandlers, BaseCondition.class);
this.registerHandlers(this.contHandlers, BaseContent.class);
this.registerHandlers(this.execHandlers, QuestExecHandler.class);
}
public <T> void registerHandlers(Int2ObjectMap<T> map, Class<T> clazz) {
@@ -43,7 +40,8 @@ public final class QuestSystem extends BaseGameSystem {
public <T> void registerHandler(Int2ObjectMap<T> map, Class<? extends T> handlerClass) {
try {
int value; if (handlerClass.isAnnotationPresent(QuestValueExec.class)) {
int value;
if (handlerClass.isAnnotationPresent(QuestValueExec.class)) {
QuestValueExec opcode = handlerClass.getAnnotation(QuestValueExec.class);
value = opcode.value().getValue();
} else if (handlerClass.isAnnotationPresent(QuestValueContent.class)) {
@@ -62,7 +60,8 @@ public final class QuestSystem extends BaseGameSystem {
map.put(value, handlerClass.getDeclaredConstructor().newInstance());
} catch (Exception e) {
Grasscutter.getLogger().warn("Unable to register handler {}.", handlerClass.getSimpleName(), e);
Grasscutter.getLogger()
.warn("Unable to register handler {}.", handlerClass.getSimpleName(), e);
}
}