From 395844c25a9a07e94eb15996e04fe2eedbe2d752 Mon Sep 17 00:00:00 2001 From: Ka0rX Date: Sun, 2 Apr 2023 19:47:58 +0100 Subject: [PATCH] Better error handling & console messages for the new class-confirm GUI. --- .../java/net/Indyuce/mmocore/manager/InventoryManager.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MMOCore-API/src/main/java/net/Indyuce/mmocore/manager/InventoryManager.java b/MMOCore-API/src/main/java/net/Indyuce/mmocore/manager/InventoryManager.java index 56953b6b..4d931033 100644 --- a/MMOCore-API/src/main/java/net/Indyuce/mmocore/manager/InventoryManager.java +++ b/MMOCore-API/src/main/java/net/Indyuce/mmocore/manager/InventoryManager.java @@ -44,11 +44,11 @@ public class InventoryManager { list.forEach(inv -> { String folder="gui"+(inv instanceof ClassConfirmation?"/class-confirm":""); - MMOCore.plugin.configManager.loadDefaultFile(folder, inv.getId() + ".yml"); try { + MMOCore.plugin.configManager.loadDefaultFile(folder, inv.getId() + ".yml"); inv.reload(new ConfigFile("/"+folder, inv.getId()).getConfig()); } catch (Exception exception) { - MMOCore.log(Level.WARNING, "Could not load inventory '" + inv.getId() + "': " + exception.getMessage()); + MMOCore.log(Level.WARNING, "Could not load inventory '" +(inv instanceof ClassConfirmation?"class-confirm/":""+ inv.getId() + "': " + exception.getMessage())); } }); }