From 65d18509d09cefe753a6fb0292e09f73111319dd Mon Sep 17 00:00:00 2001 From: Ka0rX Date: Sun, 9 Jul 2023 22:41:50 +0100 Subject: [PATCH] Fix skilltree GUI. --- .../net/Indyuce/mmocore/gui/skilltree/SkillTreeViewer.java | 6 +++--- .../java/net/Indyuce/mmocore/manager/InventoryManager.java | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/MMOCore-API/src/main/java/net/Indyuce/mmocore/gui/skilltree/SkillTreeViewer.java b/MMOCore-API/src/main/java/net/Indyuce/mmocore/gui/skilltree/SkillTreeViewer.java index bf525f4b..d0c232df 100644 --- a/MMOCore-API/src/main/java/net/Indyuce/mmocore/gui/skilltree/SkillTreeViewer.java +++ b/MMOCore-API/src/main/java/net/Indyuce/mmocore/gui/skilltree/SkillTreeViewer.java @@ -52,9 +52,9 @@ public class SkillTreeViewer extends EditableInventory { this.defaultSkillTree = null; } - public SkillTreeViewer(SkillTree defaultSkillTree, boolean isDefault) { - super("specific-skill-tree-" + (isDefault ? "default" : UtilityMethods.ymlName(defaultSkillTree.getId()))); - this.defaultSkillTree = defaultSkillTree; + public SkillTreeViewer(SkillTree initialSkillTree, boolean isDefault) { + super("specific-skill-tree-" + (isDefault ? "default" : UtilityMethods.ymlName(initialSkillTree.getId()))); + this.defaultSkillTree = initialSkillTree; } @Override 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 f2acf663..cf72ad0a 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 @@ -50,7 +50,7 @@ public class InventoryManager { } for (String id : loader.ids) { String formattedId = UtilityMethods.ymlName(id); - final ConfigFile configFile = new ConfigFile("gui/" + loader.name, loader.name + "-" + formattedId); + final ConfigFile configFile = new ConfigFile("/gui/" + loader.name, loader.name + "-" + formattedId); final EditableInventory GUI = loader.provider.apply(id, !configFile.exists()); loader.inventories.put(formattedId, GUI); GUI.reload(new ConfigFile("/gui/" + loader.name, GUI.getId()).getConfig());