From 2717a7bbeee6de2305a9e19c31382a66ceee7f08 Mon Sep 17 00:00:00 2001 From: Eric Stokes Date: Tue, 22 Nov 2011 00:14:54 -0700 Subject: [PATCH] Attempted fix for npe on worldmanager --- .../MultiverseCore/MultiverseCore.java | 43 ------------------- .../MultiverseCore/utils/WorldManager.java | 5 ++- 2 files changed, 4 insertions(+), 44 deletions(-) diff --git a/src/main/java/com/onarandombox/MultiverseCore/MultiverseCore.java b/src/main/java/com/onarandombox/MultiverseCore/MultiverseCore.java index 8557f469..b14f8425 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/MultiverseCore.java +++ b/src/main/java/com/onarandombox/MultiverseCore/MultiverseCore.java @@ -347,39 +347,6 @@ public class MultiverseCore extends JavaPlugin implements MVPlugin, Core { this.commandHandler.registerCommand(new CheckCommand(this)); } - /** Deprecated, please use WorldManager.loadWorlds(Boolean forceLoad) now. */ - @Deprecated - public void loadWorlds(boolean forceLoad) { - this.worldManager.loadWorlds(true); - } - - /** - * Deprecated, please use WorldManager.addWorld(String name, Environment env, String seedString, String generator) - * now. - */ - @Deprecated - public boolean addWorld(String name, Environment env, String seedString, String generator) { - return this.worldManager.addWorld(name, env, seedString, generator); - } - - /** Deprecated, please use WorldManager.unloadWorld(String name) now. */ - @Deprecated - public boolean removeWorldFromList(String name) { - return this.worldManager.unloadWorld(name); - } - - /** Deprecated, please use WorldManager.removeWorldFromConfig(String name) now. */ - @Deprecated - public boolean removeWorldFromConfig(String name) { - return this.worldManager.removeWorldFromConfig(name); - } - - /** Deprecated please use WorldManager.deleteWorld(String name) now. */ - @Deprecated - public Boolean deleteWorld(String name) { - return this.worldManager.deleteWorld(name); - } - /** What happens when the plugin gets disabled... */ public void onDisable() { debugLog.close(); @@ -416,16 +383,6 @@ public class MultiverseCore extends JavaPlugin implements MVPlugin, Core { return this.ph; } - @Deprecated - public com.onarandombox.MultiverseCore.MVPermissions getPermissions() { - return new com.onarandombox.MultiverseCore.MVPermissions(this); - } - - @Deprecated - public PurgeWorlds getWorldPurger() { - return this.worldManager.getWorldPurger(); - } - /** onCommand */ @Override public boolean onCommand(CommandSender sender, Command command, String commandLabel, String[] args) { diff --git a/src/main/java/com/onarandombox/MultiverseCore/utils/WorldManager.java b/src/main/java/com/onarandombox/MultiverseCore/utils/WorldManager.java index 5bfa7d90..351d13d3 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/utils/WorldManager.java +++ b/src/main/java/com/onarandombox/MultiverseCore/utils/WorldManager.java @@ -383,7 +383,10 @@ public class WorldManager implements MVWorldManager { String seedString = this.configWorlds.getString("worlds." + worldKey + ".seed", ""); String generatorString = this.configWorlds.getString("worlds." + worldKey + ".generator"); - + if (environment.equalsIgnoreCase("skylands")) { + this.plugin.log(Level.WARNING, "Found SKYLANDS world. Not importing automatically, as it won't work atm :("); + continue; + } addWorld(worldKey, this.plugin.getEnvFromString(environment), seedString, generatorString); // Increment the world count