aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/moe
diff options
context:
space:
mode:
authorLinnea Gräf <nea@nea.moe>2025-09-28 19:48:11 +0200
committerLinnea Gräf <nea@nea.moe>2025-10-13 18:26:42 +0200
commit9b6c8f21f86385c993c0e34ba4b31348cae200cd (patch)
treed310ffaf3e98af40c64d9895771026dd7ee4c56d /src/main/java/moe
parente8a42a056cb0209f8bbeb35dd74f42e5c2d8bd62 (diff)
downloadFirmament-9b6c8f21f86385c993c0e34ba4b31348cae200cd.tar.gz
Firmament-9b6c8f21f86385c993c0e34ba4b31348cae200cd.tar.bz2
Firmament-9b6c8f21f86385c993c0e34ba4b31348cae200cd.zip
fix: improve config backups
Diffstat (limited to 'src/main/java/moe')
-rw-r--r--src/main/java/moe/nea/firmament/util/data/ManagedConfig.kt5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main/java/moe/nea/firmament/util/data/ManagedConfig.kt b/src/main/java/moe/nea/firmament/util/data/ManagedConfig.kt
index b441b02..4d22d71 100644
--- a/src/main/java/moe/nea/firmament/util/data/ManagedConfig.kt
+++ b/src/main/java/moe/nea/firmament/util/data/ManagedConfig.kt
@@ -110,6 +110,11 @@ abstract class ManagedConfig(
}
}
+ override fun explicitDefaultLoad() {
+ val empty = JsonObject(mapOf())
+ sortedOptions.forEach { it.load(empty) }
+ }
+
override fun loadFrom(key: Unit, jsonObject: JsonObject) {
val unprefixed = jsonObject[name]?.jsonObject ?: JsonObject(mapOf())
sortedOptions.forEach {