Fix skilltree GUI.

This commit is contained in:
Ka0rX 2023-07-09 22:41:50 +01:00
parent 694ca2cac9
commit 65d18509d0
2 changed files with 4 additions and 4 deletions

View File

@ -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

View File

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