Attempted fix for npe on worldmanager

This commit is contained in:
Eric Stokes 2011-11-22 00:14:54 -07:00
parent 29bc8bfbfc
commit 2717a7bbee
2 changed files with 4 additions and 44 deletions

View File

@ -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) {

View File

@ -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