forked from Upstream/mmocore
Fixed NPE with yaml data loading
This commit is contained in:
parent
41617f722c
commit
590801203d
@ -74,6 +74,7 @@ public class YAMLPlayerDataHandler extends YAMLSynchronizedDataHandler<PlayerDat
|
|||||||
if (config.isConfigurationSection("bound-skills"))
|
if (config.isConfigurationSection("bound-skills"))
|
||||||
for (String key : config.getConfigurationSection("bound-skills").getKeys(false)) {
|
for (String key : config.getConfigurationSection("bound-skills").getKeys(false)) {
|
||||||
ClassSkill skill = data.getProfess().getSkill(config.getString("bound-skills." + key));
|
ClassSkill skill = data.getProfess().getSkill(config.getString("bound-skills." + key));
|
||||||
|
if (skill != null)
|
||||||
data.bindSkill(Integer.parseInt(key), skill);
|
data.bindSkill(Integer.parseInt(key), skill);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user