From e7aa563352f7d8d6d9c94270952088792925f6a0 Mon Sep 17 00:00:00 2001 From: "main()" Date: Sun, 16 Oct 2011 15:29:09 +0200 Subject: [PATCH 1/2] Revert "Fix startup error on Windows." This reverts commit 01bed7cc4b5a48fef1e1354f53e064309b249f5c. Because that commit CAUSED a startup error instead of fixing one. --- .../java/com/onarandombox/MultiverseCore/MultiverseCore.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/onarandombox/MultiverseCore/MultiverseCore.java b/src/main/java/com/onarandombox/MultiverseCore/MultiverseCore.java index feb788d2..6dd77c9b 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/MultiverseCore.java +++ b/src/main/java/com/onarandombox/MultiverseCore/MultiverseCore.java @@ -256,7 +256,7 @@ public class MultiverseCore extends JavaPlugin implements MVPlugin, Core { public void loadConfigs() { // Now grab the Configuration Files. this.multiverseConfig = YamlConfiguration.loadConfiguration(new File(getDataFolder(), "config.yml")); - Configuration coreDefaults = YamlConfiguration.loadConfiguration(this.getClass().getResourceAsStream(File.separator + "defaults" + File.separator + "config.yml")); + Configuration coreDefaults = YamlConfiguration.loadConfiguration(this.getClass().getResourceAsStream("/defaults/config.yml")); this.multiverseConfig.setDefaults(coreDefaults); this.multiverseConfig.options().copyDefaults(true); this.worldManager.loadWorldConfig(new File(getDataFolder(), "worlds.yml")); From 67c165ff258bb5d0f84f3acbe914141135a5f7b5 Mon Sep 17 00:00:00 2001 From: "main()" Date: Sun, 16 Oct 2011 17:36:18 +0200 Subject: [PATCH 2/2] Fixed #191 (WorldManager.deleteWorld()). --- .../onarandombox/MultiverseCore/utils/WorldManager.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/onarandombox/MultiverseCore/utils/WorldManager.java b/src/main/java/com/onarandombox/MultiverseCore/utils/WorldManager.java index 8c28b36d..ece1e8c2 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/utils/WorldManager.java +++ b/src/main/java/com/onarandombox/MultiverseCore/utils/WorldManager.java @@ -197,11 +197,9 @@ public class WorldManager implements MVWorldManager { */ public Boolean deleteWorld(String name) { - if (this.plugin.getServer().getWorld(name) != null) { - if (!unloadWorldFromBukkit(name, false)) { - // If the world was loaded, and we couldn't unload it, return false. DON"T DELTEE - return false; - } + if (this.plugin.getServer().getWorld(name) == null) { + // We can only delete loaded worlds + return false; } removeWorldFromConfig(name); try { @@ -225,6 +223,7 @@ public class WorldManager implements MVWorldManager { this.plugin.log(Level.SEVERE, "rm " + worldFile.getAbsolutePath()); return false; } + plugin.log(Level.FINER, "deleteWorld(): worldFile: " + worldFile.getAbsolutePath()); boolean deletedWorld = FileUtils.deleteFolder(worldFile); if (deletedWorld) { this.plugin.log(Level.INFO, "World " + name + " was DELETED.");