From 61c6cd1b559b99564cd868d28e05ff5238bf1166 Mon Sep 17 00:00:00 2001 From: TheYeti Date: Mon, 30 Jan 2012 13:47:47 -0800 Subject: [PATCH] Change from FileConfiguration to YamlConfiguration --- .../java/com/gmail/nossr50/config/LoadProperties.java | 10 +++++----- src/main/java/com/gmail/nossr50/mcMMO.java | 1 + 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/gmail/nossr50/config/LoadProperties.java b/src/main/java/com/gmail/nossr50/config/LoadProperties.java index 20a170bb2..81af2af70 100644 --- a/src/main/java/com/gmail/nossr50/config/LoadProperties.java +++ b/src/main/java/com/gmail/nossr50/config/LoadProperties.java @@ -20,7 +20,7 @@ import com.gmail.nossr50.mcMMO; import java.io.File; import java.io.IOException; -import org.bukkit.configuration.file.FileConfiguration; +import org.bukkit.configuration.file.YamlConfiguration; import com.gmail.nossr50.datatypes.HUDType; @@ -59,13 +59,13 @@ public class LoadProperties protected static File configFile; protected static File dataFolder; protected final mcMMO plugin; - protected static FileConfiguration config; + protected static YamlConfiguration config; public LoadProperties(mcMMO plugin) { this.plugin = plugin; dataFolder = plugin.getDataFolder(); - configFile = new File(dataFolder, "config.yml"); + configFile = new File(dataFolder, File.separator + "config.yml"); } public void configCheck() @@ -123,10 +123,10 @@ public class LoadProperties return result; } - private FileConfiguration load() + private YamlConfiguration load() { try { - config.load(configFile); + config = YamlConfiguration.loadConfiguration(configFile); return config; } catch (Exception e) { diff --git a/src/main/java/com/gmail/nossr50/mcMMO.java b/src/main/java/com/gmail/nossr50/mcMMO.java index b80b9fbce..086514388 100644 --- a/src/main/java/com/gmail/nossr50/mcMMO.java +++ b/src/main/java/com/gmail/nossr50/mcMMO.java @@ -127,6 +127,7 @@ public class mcMMO extends JavaPlugin mcPermissions.initialize(getServer()); + System.out.println("[mcMMO]Checking config file at: " + this.getDataFolder().toString() + File.separator + "config.yml"); config.configCheck(); Party.getInstance().loadParties();