diff --git a/src/main/java/com/gmail/nossr50/config/Config.java b/src/main/java/com/gmail/nossr50/config/Config.java index 8f2cfd84e..9a31d39cb 100644 --- a/src/main/java/com/gmail/nossr50/config/Config.java +++ b/src/main/java/com/gmail/nossr50/config/Config.java @@ -12,6 +12,7 @@ public class Config extends ConfigLoader { private Config() { super("config.yml"); xpGainMultiplier = getExperienceGainsGlobalMultiplier(); + loadKeys(); } public static Config getInstance() { diff --git a/src/main/java/com/gmail/nossr50/config/ConfigLoader.java b/src/main/java/com/gmail/nossr50/config/ConfigLoader.java index ebef53316..a3dcc9f86 100644 --- a/src/main/java/com/gmail/nossr50/config/ConfigLoader.java +++ b/src/main/java/com/gmail/nossr50/config/ConfigLoader.java @@ -19,16 +19,16 @@ public abstract class ConfigLoader { public ConfigLoader(String relativePath, String fileName){ this.fileName = fileName; configFile = new File(plugin.getDataFolder(), relativePath + File.separator + fileName); - load(); + loadFile(); } public ConfigLoader(String fileName){ this.fileName = fileName; configFile = new File(plugin.getDataFolder(), fileName); - load(); + loadFile(); } - protected void load() { + protected void loadFile() { if (!configFile.exists()) { plugin.getLogger().info("Creating mcMMO " + fileName + " File..."); createFile(); diff --git a/src/main/java/com/gmail/nossr50/config/SpoutConfig.java b/src/main/java/com/gmail/nossr50/config/SpoutConfig.java index e76689bd8..30ad99d2f 100644 --- a/src/main/java/com/gmail/nossr50/config/SpoutConfig.java +++ b/src/main/java/com/gmail/nossr50/config/SpoutConfig.java @@ -8,6 +8,7 @@ public class SpoutConfig extends ConfigLoader { private SpoutConfig() { super("spout.yml"); + loadKeys(); } public static SpoutConfig getInstance() { diff --git a/src/main/java/com/gmail/nossr50/config/TreasuresConfig.java b/src/main/java/com/gmail/nossr50/config/TreasuresConfig.java index 63a2ba706..e35823fae 100644 --- a/src/main/java/com/gmail/nossr50/config/TreasuresConfig.java +++ b/src/main/java/com/gmail/nossr50/config/TreasuresConfig.java @@ -32,6 +32,7 @@ public class TreasuresConfig extends ConfigLoader{ private TreasuresConfig() { super("treasures.yml"); + loadKeys(); } public static TreasuresConfig getInstance() { diff --git a/src/main/java/com/gmail/nossr50/config/mods/CustomArmorConfig.java b/src/main/java/com/gmail/nossr50/config/mods/CustomArmorConfig.java index 407801211..d804147c0 100644 --- a/src/main/java/com/gmail/nossr50/config/mods/CustomArmorConfig.java +++ b/src/main/java/com/gmail/nossr50/config/mods/CustomArmorConfig.java @@ -26,6 +26,7 @@ public class CustomArmorConfig extends ConfigLoader{ public CustomArmorConfig() { super("ModConfigs", "armor.yml"); + loadKeys(); } public static CustomArmorConfig getInstance() { diff --git a/src/main/java/com/gmail/nossr50/config/mods/CustomBlocksConfig.java b/src/main/java/com/gmail/nossr50/config/mods/CustomBlocksConfig.java index 2bf3f6d2d..b1ca32ef2 100644 --- a/src/main/java/com/gmail/nossr50/config/mods/CustomBlocksConfig.java +++ b/src/main/java/com/gmail/nossr50/config/mods/CustomBlocksConfig.java @@ -26,6 +26,7 @@ public class CustomBlocksConfig extends ConfigLoader { public CustomBlocksConfig() { super("ModConfigs", "blocks.yml"); + loadKeys(); } public static CustomBlocksConfig getInstance() { diff --git a/src/main/java/com/gmail/nossr50/config/mods/CustomToolsConfig.java b/src/main/java/com/gmail/nossr50/config/mods/CustomToolsConfig.java index 4a53ec0fb..a32960f90 100644 --- a/src/main/java/com/gmail/nossr50/config/mods/CustomToolsConfig.java +++ b/src/main/java/com/gmail/nossr50/config/mods/CustomToolsConfig.java @@ -28,6 +28,7 @@ public class CustomToolsConfig extends ConfigLoader { private CustomToolsConfig() { super("ModConfigs", "tools.yml"); + loadKeys(); } public static CustomToolsConfig getInstance() { diff --git a/src/main/java/com/gmail/nossr50/config/repair/RepairConfig.java b/src/main/java/com/gmail/nossr50/config/repair/RepairConfig.java index c750f7e3d..fac81f730 100644 --- a/src/main/java/com/gmail/nossr50/config/repair/RepairConfig.java +++ b/src/main/java/com/gmail/nossr50/config/repair/RepairConfig.java @@ -5,7 +5,6 @@ import java.util.List; import java.util.Set; import org.bukkit.configuration.ConfigurationSection; -import org.bukkit.configuration.file.YamlConfiguration; import com.gmail.nossr50.config.ConfigLoader; import com.gmail.nossr50.skills.repair.RepairItemType; @@ -18,7 +17,7 @@ public class RepairConfig extends ConfigLoader { public RepairConfig(String fileName) { super(fileName); - this.config = YamlConfiguration.loadConfiguration(this.configFile); + loadKeys(); } @Override