forked from Upstream/mmocore
Saves Bound Skills in YamlPlayerDataManager
This commit is contained in:
parent
9e16e63bf5
commit
ca7ee79c73
@ -155,6 +155,10 @@ public class SavedClassInformation {
|
||||
registerSkillLevel(skill.getHandler().getId(), level);
|
||||
}
|
||||
|
||||
public Map<Integer, String> getBoundSkills() {
|
||||
return boundSkills;
|
||||
}
|
||||
|
||||
public int getSkillTreeReallocationPoints() {
|
||||
return skillTreeReallocationPoints;
|
||||
}
|
||||
|
@ -157,9 +157,7 @@ public class YAMLPlayerDataManager extends PlayerDataManager {
|
||||
data.mapSkillLevels().forEach((key1, value) -> config.set("skill." + key1, value));
|
||||
data.getItemClaims().forEach((key, times) -> config.set("times-claimed." + key, times));
|
||||
|
||||
Map<Integer,String> boundSkills = new HashMap<>();
|
||||
data.mapBoundSkills().forEach((slot,skill)->config.set("bound-skills."+slot,skill));
|
||||
config.set("bound-skills", boundSkills);
|
||||
|
||||
config.set("attribute", null);
|
||||
config.createSection("attribute");
|
||||
@ -191,6 +189,7 @@ public class YAMLPlayerDataManager extends PlayerDataManager {
|
||||
info.getAttributeKeys().forEach(attribute -> config.set("class-info." + key + ".attribute." + attribute, info.getAttributeLevel(attribute)));
|
||||
info.getNodeKeys().forEach(node -> config.set("class-info." + key + ".node-levels." + node, info.getNodeLevel(node)));
|
||||
info.getSkillTreePointsKeys().forEach(skillTreeId -> config.set("class-info." + key + ".skill-tree-points." + skillTreeId, info.getAttributeLevel(skillTreeId)));
|
||||
info.getBoundSkills().forEach((slot,skill)->config.set("class-info." + key + ".bound-skills."+slot,skill));
|
||||
}
|
||||
|
||||
file.save();
|
||||
|
Loading…
Reference in New Issue
Block a user