Fixed NPE with yaml data loading

This commit is contained in:
Jules 2023-04-23 22:08:30 +02:00
parent 41617f722c
commit 590801203d

View File

@ -74,7 +74,8 @@ public class YAMLPlayerDataHandler extends YAMLSynchronizedDataHandler<PlayerDat
if (config.isConfigurationSection("bound-skills"))
for (String key : config.getConfigurationSection("bound-skills").getKeys(false)) {
ClassSkill skill = data.getProfess().getSkill(config.getString("bound-skills." + key));
data.bindSkill(Integer.parseInt(key), skill);
if (skill != null)
data.bindSkill(Integer.parseInt(key), skill);
}
for (String key : MMOCore.plugin.skillTreeManager.getAll().