Forgot to loadKeys()

This commit is contained in:
bm01 2012-07-03 23:29:26 +02:00
parent c6e5264b7b
commit 51ca29ab9f
8 changed files with 10 additions and 5 deletions

View File

@ -12,6 +12,7 @@ public class Config extends ConfigLoader {
private Config() { private Config() {
super("config.yml"); super("config.yml");
xpGainMultiplier = getExperienceGainsGlobalMultiplier(); xpGainMultiplier = getExperienceGainsGlobalMultiplier();
loadKeys();
} }
public static Config getInstance() { public static Config getInstance() {

View File

@ -19,16 +19,16 @@ public abstract class ConfigLoader {
public ConfigLoader(String relativePath, String fileName){ public ConfigLoader(String relativePath, String fileName){
this.fileName = fileName; this.fileName = fileName;
configFile = new File(plugin.getDataFolder(), relativePath + File.separator + fileName); configFile = new File(plugin.getDataFolder(), relativePath + File.separator + fileName);
load(); loadFile();
} }
public ConfigLoader(String fileName){ public ConfigLoader(String fileName){
this.fileName = fileName; this.fileName = fileName;
configFile = new File(plugin.getDataFolder(), fileName); configFile = new File(plugin.getDataFolder(), fileName);
load(); loadFile();
} }
protected void load() { protected void loadFile() {
if (!configFile.exists()) { if (!configFile.exists()) {
plugin.getLogger().info("Creating mcMMO " + fileName + " File..."); plugin.getLogger().info("Creating mcMMO " + fileName + " File...");
createFile(); createFile();

View File

@ -8,6 +8,7 @@ public class SpoutConfig extends ConfigLoader {
private SpoutConfig() { private SpoutConfig() {
super("spout.yml"); super("spout.yml");
loadKeys();
} }
public static SpoutConfig getInstance() { public static SpoutConfig getInstance() {

View File

@ -32,6 +32,7 @@ public class TreasuresConfig extends ConfigLoader{
private TreasuresConfig() { private TreasuresConfig() {
super("treasures.yml"); super("treasures.yml");
loadKeys();
} }
public static TreasuresConfig getInstance() { public static TreasuresConfig getInstance() {

View File

@ -26,6 +26,7 @@ public class CustomArmorConfig extends ConfigLoader{
public CustomArmorConfig() { public CustomArmorConfig() {
super("ModConfigs", "armor.yml"); super("ModConfigs", "armor.yml");
loadKeys();
} }
public static CustomArmorConfig getInstance() { public static CustomArmorConfig getInstance() {

View File

@ -26,6 +26,7 @@ public class CustomBlocksConfig extends ConfigLoader {
public CustomBlocksConfig() { public CustomBlocksConfig() {
super("ModConfigs", "blocks.yml"); super("ModConfigs", "blocks.yml");
loadKeys();
} }
public static CustomBlocksConfig getInstance() { public static CustomBlocksConfig getInstance() {

View File

@ -28,6 +28,7 @@ public class CustomToolsConfig extends ConfigLoader {
private CustomToolsConfig() { private CustomToolsConfig() {
super("ModConfigs", "tools.yml"); super("ModConfigs", "tools.yml");
loadKeys();
} }
public static CustomToolsConfig getInstance() { public static CustomToolsConfig getInstance() {

View File

@ -5,7 +5,6 @@ import java.util.List;
import java.util.Set; import java.util.Set;
import org.bukkit.configuration.ConfigurationSection; import org.bukkit.configuration.ConfigurationSection;
import org.bukkit.configuration.file.YamlConfiguration;
import com.gmail.nossr50.config.ConfigLoader; import com.gmail.nossr50.config.ConfigLoader;
import com.gmail.nossr50.skills.repair.RepairItemType; import com.gmail.nossr50.skills.repair.RepairItemType;
@ -18,7 +17,7 @@ public class RepairConfig extends ConfigLoader {
public RepairConfig(String fileName) { public RepairConfig(String fileName) {
super(fileName); super(fileName);
this.config = YamlConfiguration.loadConfiguration(this.configFile); loadKeys();
} }
@Override @Override