- fix: compatible for the case if the config class of mod updated

This commit is contained in:
Jaffe2718
2025-08-06 18:48:53 +08:00
parent 9602736335
commit b7c9d83078
2 changed files with 2 additions and 2 deletions

View File

@@ -132,7 +132,7 @@ public abstract class MidnightConfig {
entries.values().forEach(info -> {
if (info.field != null && info.entry != null) {
try {
info.value = info.field.get(null);
info.value = info.field.get(null) == null ? info.defaultValue : info.field.get(null);
info.tempValue = info.toTemporaryValue();
info.updateConditions();
} catch (IllegalAccessException ignored) {}