mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-10 18:40:15 +08:00
Initialize a template for first load of PluginData
This commit is contained in:
parent
2c38ce920a
commit
aa5b625680
@ -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)" }
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user