From 611272e5bbc503c7dbfc01bb24a1a99b82398bf3 Mon Sep 17 00:00:00 2001 From: Jules Date: Sun, 25 Jun 2023 02:32:35 +0200 Subject: [PATCH] Catch malformed json errors on class loading --- .../net/Indyuce/mmocore/api/player/profess/PlayerClass.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MMOCore-API/src/main/java/net/Indyuce/mmocore/api/player/profess/PlayerClass.java b/MMOCore-API/src/main/java/net/Indyuce/mmocore/api/player/profess/PlayerClass.java index 53ad651a..115a91cb 100644 --- a/MMOCore-API/src/main/java/net/Indyuce/mmocore/api/player/profess/PlayerClass.java +++ b/MMOCore-API/src/main/java/net/Indyuce/mmocore/api/player/profess/PlayerClass.java @@ -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()); }