From 7f4e3fedb3b9c736a49ab3ceb77886255ee3aeb1 Mon Sep 17 00:00:00 2001 From: GJ Date: Fri, 18 Oct 2013 10:12:55 -0400 Subject: [PATCH] Need different methods for mod files and regular files. --- src/main/java/com/gmail/nossr50/config/ConfigLoader.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/gmail/nossr50/config/ConfigLoader.java b/src/main/java/com/gmail/nossr50/config/ConfigLoader.java index 0627ac4e6..706a20688 100644 --- a/src/main/java/com/gmail/nossr50/config/ConfigLoader.java +++ b/src/main/java/com/gmail/nossr50/config/ConfigLoader.java @@ -29,7 +29,13 @@ public abstract class ConfigLoader { protected void loadFile() { if (!configFile.exists()) { plugin.debug("Creating mcMMO " + fileName + " File..."); - plugin.saveResource(configFile.getParentFile().getName() + File.separator + fileName, false); + + try { + plugin.saveResource(fileName, false); // Normal files + } + catch (IllegalArgumentException ex) { + plugin.saveResource(configFile.getParentFile().getName() + File.separator + fileName, false); // Mod files + } } else { plugin.debug("Loading mcMMO " + fileName + " File...");