Better error handling & console messages for the new class-confirm GUI.

This commit is contained in:
Ka0rX 2023-04-02 19:47:58 +01:00
parent 3a9b3b6f56
commit 395844c25a

View File

@ -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()));
}
});
}