Fix null environments for worlds

This commit is contained in:
Eric Stokes 2011-06-26 09:16:26 -06:00
parent 19da230723
commit be8ff3ad6d
2 changed files with 3 additions and 2 deletions

View File

@ -50,6 +50,7 @@ public class MVWorld {
this.generator = world.getGenerator();
this.generatorString = generatorString;
this.seed = seed;
this.environment = world.getEnvironment();
this.initLists();
@ -78,7 +79,7 @@ public class MVWorld {
this.setRealMobBehaviors();
config.setProperty("worlds." + this.name + ".environment", world.getEnvironment());
config.setProperty("worlds." + this.name + ".environment", this.environment);
config.setProperty("worlds." + this.name + ".generatorString",generatorString);
if (seed != null) {
config.setProperty("worlds." + this.name + ".seed", this.seed);

View File

@ -393,7 +393,7 @@ public class MultiverseCore extends JavaPlugin {
public boolean addWorld(String name, Environment env, String seedString, String generator) {
Long seed = null;
if (seedString.length() > 0) {
if (seedString != null && seedString.length() > 0) {
try {
seed = Long.parseLong(seedString);
} catch (NumberFormatException numberformatexception) {