diff --git a/src/main/java/com/gmail/nossr50/config/mods/ArmorConfigManager.java b/src/main/java/com/gmail/nossr50/config/mods/ArmorConfigManager.java index 9a89feac2..a5afca651 100644 --- a/src/main/java/com/gmail/nossr50/config/mods/ArmorConfigManager.java +++ b/src/main/java/com/gmail/nossr50/config/mods/ArmorConfigManager.java @@ -1,11 +1,11 @@ package com.gmail.nossr50.config.mods; -import com.gmail.nossr50.mcMMO; -import com.gmail.nossr50.util.ModManager; - import java.io.File; import java.util.regex.Pattern; +import com.gmail.nossr50.mcMMO; +import com.gmail.nossr50.util.ModManager; + public class ArmorConfigManager { public ArmorConfigManager(mcMMO plugin) { Pattern middlePattern = Pattern.compile("armor\\.(?:.+)\\.yml"); @@ -15,7 +15,7 @@ public class ArmorConfigManager { ModManager modManager = mcMMO.getModManager(); if (!vanilla.exists()) { - plugin.saveResource(plugin.getDataFolder().getName() + File.separator + "armor.default.yml", false); + plugin.saveResource(vanilla.getParentFile().getName() + File.separator + "armor.default.yml", false); } for (String fileName : dataFolder.list()) { diff --git a/src/main/java/com/gmail/nossr50/config/mods/BlockConfigManager.java b/src/main/java/com/gmail/nossr50/config/mods/BlockConfigManager.java index cc03629c6..8de5e6b65 100644 --- a/src/main/java/com/gmail/nossr50/config/mods/BlockConfigManager.java +++ b/src/main/java/com/gmail/nossr50/config/mods/BlockConfigManager.java @@ -1,11 +1,11 @@ package com.gmail.nossr50.config.mods; -import com.gmail.nossr50.mcMMO; -import com.gmail.nossr50.util.ModManager; - import java.io.File; import java.util.regex.Pattern; +import com.gmail.nossr50.mcMMO; +import com.gmail.nossr50.util.ModManager; + public class BlockConfigManager { public BlockConfigManager(mcMMO plugin) { Pattern middlePattern = Pattern.compile("blocks\\.(?:.+)\\.yml"); @@ -15,7 +15,7 @@ public class BlockConfigManager { ModManager modManager = mcMMO.getModManager(); if (!vanilla.exists()) { - plugin.saveResource(plugin.getDataFolder().getName() + File.separator + "blocks.default.yml", false); + plugin.saveResource(vanilla.getParentFile().getName() + File.separator + "blocks.default.yml", false); } for (String fileName : dataFolder.list()) { diff --git a/src/main/java/com/gmail/nossr50/config/mods/EntityConfigManager.java b/src/main/java/com/gmail/nossr50/config/mods/EntityConfigManager.java index 5c48ee0f7..7a905276d 100644 --- a/src/main/java/com/gmail/nossr50/config/mods/EntityConfigManager.java +++ b/src/main/java/com/gmail/nossr50/config/mods/EntityConfigManager.java @@ -1,11 +1,11 @@ package com.gmail.nossr50.config.mods; -import com.gmail.nossr50.mcMMO; -import com.gmail.nossr50.util.ModManager; - import java.io.File; import java.util.regex.Pattern; +import com.gmail.nossr50.mcMMO; +import com.gmail.nossr50.util.ModManager; + public class EntityConfigManager { public EntityConfigManager(mcMMO plugin) { Pattern middlePattern = Pattern.compile("entities\\.(?:.+)\\.yml"); @@ -15,7 +15,7 @@ public class EntityConfigManager { ModManager modManager = mcMMO.getModManager(); if (!vanilla.exists()) { - plugin.saveResource(plugin.getDataFolder().getName() + File.separator + "entities.default.yml", false); + plugin.saveResource(vanilla.getParentFile().getName() + File.separator + "entities.default.yml", false); } for (String fileName : dataFolder.list()) { diff --git a/src/main/java/com/gmail/nossr50/config/mods/ToolConfigManager.java b/src/main/java/com/gmail/nossr50/config/mods/ToolConfigManager.java index 35c6a339f..11ba1fca2 100644 --- a/src/main/java/com/gmail/nossr50/config/mods/ToolConfigManager.java +++ b/src/main/java/com/gmail/nossr50/config/mods/ToolConfigManager.java @@ -1,11 +1,11 @@ package com.gmail.nossr50.config.mods; -import com.gmail.nossr50.mcMMO; -import com.gmail.nossr50.util.ModManager; - import java.io.File; import java.util.regex.Pattern; +import com.gmail.nossr50.mcMMO; +import com.gmail.nossr50.util.ModManager; + public class ToolConfigManager { public ToolConfigManager(mcMMO plugin) { Pattern middlePattern = Pattern.compile("tools\\.(?:.+)\\.yml"); @@ -15,7 +15,7 @@ public class ToolConfigManager { ModManager modManager = mcMMO.getModManager(); if (!vanilla.exists()) { - plugin.saveResource(plugin.getDataFolder().getName() + File.separator + "tools.default.yml", false); + plugin.saveResource(vanilla.getParentFile().getName() + File.separator + "tools.default.yml", false); } for (String fileName : dataFolder.list()) {