forked from Upstream/mmocore
Error handling for skill trees in player classes.
This commit is contained in:
parent
bc0c4f7283
commit
2279c62b14
@ -136,7 +136,12 @@ public class PlayerClass extends PostLoadObject implements ExperienceObject {
|
||||
}
|
||||
this.expTable = expTable;
|
||||
if (config.contains("skill-trees"))
|
||||
config.getStringList("skill-trees").forEach(str-> skillTrees.add(MMOCore.plugin.skillTreeManager.get(str)));
|
||||
for (String str : config.getStringList("skill-trees"))
|
||||
try {
|
||||
skillTrees.add(MMOCore.plugin.skillTreeManager.get(str));
|
||||
} catch (Exception e) {
|
||||
MMOCore.log(Level.WARNING, "Could not find skill tree with ID: " + str);
|
||||
}
|
||||
|
||||
if (config.contains("scripts"))
|
||||
for (String key : config.getConfigurationSection("scripts").getKeys(false))
|
||||
|
Loading…
Reference in New Issue
Block a user