diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/data/MultiFilePluginDataStorageImpl.kt b/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/data/MultiFilePluginDataStorageImpl.kt index 068d1ec08..cd6816c4b 100644 --- a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/data/MultiFilePluginDataStorageImpl.kt +++ b/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/data/MultiFilePluginDataStorageImpl.kt @@ -37,6 +37,8 @@ internal open class MultiFilePluginDataStorageImpl( val text = getPluginDataFile(holder, instance).readText() if (text.isNotBlank()) { Yaml.default.decodeFromString(instance.updaterSerializer, text) + } else { + this.store(holder, instance) // save an initial copy } logger.debug { "Successfully loaded PluginData: ${instance.saveName} (containing ${instance.valueNodes.size} properties)" } }