mirror of
https://gitlab.com/phoenix-dvpmt/mmocore.git
synced 2025-04-10 19:16:11 +02:00
Catch malformed json errors on class loading
This commit is contained in:
parent
dc9f1bc1aa
commit
611272e5bb
@ -222,7 +222,7 @@ public class PlayerClass extends PostLoadObject implements ExperienceObject {
|
|||||||
for (String key : config.getStringList("main-exp-sources"))
|
for (String key : config.getStringList("main-exp-sources"))
|
||||||
try {
|
try {
|
||||||
MMOCore.plugin.experience.registerSource(MMOCore.plugin.loadManager.loadExperienceSource(new MMOLineConfig(key), this));
|
MMOCore.plugin.experience.registerSource(MMOCore.plugin.loadManager.loadExperienceSource(new MMOLineConfig(key), this));
|
||||||
} catch (IllegalArgumentException exception) {
|
} catch (RuntimeException exception) {
|
||||||
MMOCore.plugin.getLogger().log(Level.WARNING, "Could not load exp source '" + key + "' from class '"
|
MMOCore.plugin.getLogger().log(Level.WARNING, "Could not load exp source '" + key + "' from class '"
|
||||||
+ id + "': " + exception.getMessage());
|
+ id + "': " + exception.getMessage());
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user