diff options
| author | Linnea Gräf <nea@nea.moe> | 2025-09-28 19:48:11 +0200 |
|---|---|---|
| committer | Linnea Gräf <nea@nea.moe> | 2025-10-13 18:26:42 +0200 |
| commit | 9b6c8f21f86385c993c0e34ba4b31348cae200cd (patch) | |
| tree | d310ffaf3e98af40c64d9895771026dd7ee4c56d /src/main/java/moe | |
| parent | e8a42a056cb0209f8bbeb35dd74f42e5c2d8bd62 (diff) | |
| download | Firmament-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.kt | 5 |
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 { |
