Catch malformed json errors on class loading

This commit is contained in:
Jules 2023-06-25 02:32:35 +02:00
parent dc9f1bc1aa
commit 611272e5bb

View File

@ -222,7 +222,7 @@ public class PlayerClass extends PostLoadObject implements ExperienceObject {
for (String key : config.getStringList("main-exp-sources"))
try {
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 '"
+ id + "': " + exception.getMessage());
}