Initialize a template for first load of PluginData

This commit is contained in:
Him188 2020-08-29 14:29:17 +08:00
parent 2c38ce920a
commit aa5b625680

View File

@ -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)" }
}