9
0
mirror of https://github.com/Auxilor/EcoSkills.git synced 2026-01-02 13:56:38 +00:00

Urgent fix

This commit is contained in:
Auxilor
2021-09-05 11:48:36 +01:00
parent 21a7baa316
commit 065cd1a4f3

View File

@@ -63,9 +63,13 @@ private fun Player.convertFromLegacyData() {
}
for (skill in Skills.values()) {
plugin.dataYml.set("player.${this.uniqueId}.${skill.id}", this.getSkillLevel(skill))
plugin.dataYml.set(
"player.${this.uniqueId}.${skill.xpKey.key}",
this.persistentDataContainer.getOrDefault(skill.xpKey, PersistentDataType.DOUBLE, 0.0)
)
val prog = this.persistentDataContainer.get(skill.xpKey, PersistentDataType.DOUBLE)
if (prog != null) {
plugin.dataYml.set(
"player.${this.uniqueId}.${skill.xpKey.key}",
prog
)
this.persistentDataContainer.remove(skill.xpKey)
}
}
}