Fix seed not being added

Remove test methods
Bits of refactoring
This commit is contained in:
Eric Stokes 2011-06-18 14:53:51 -06:00
parent c668bdb4f5
commit 20c3b516cc
2 changed files with 7 additions and 9 deletions

View File

@ -77,10 +77,14 @@ public class MVWorld {
System.out.print(s);
}
config.setProperty("worlds." + this.name + ".environment", this.environment.toString());
config.save();
if (config.getIntList("worlds." + name + ".blockBlacklist", new ArrayList<Integer>()).size() == 0) {
addSampleData();
if(seed != null) {
config.setProperty("worlds." + this.name + ".seed", this.seed);
}
config.save();
// The following 3 lines will add some sample data to new worlds created.
// if (config.getIntList("worlds." + name + ".blockBlacklist", new ArrayList<Integer>()).size() == 0) {
// addSampleData();
// }
}
private void initLists() {

View File

@ -425,15 +425,9 @@ public class MultiverseCore extends JavaPlugin {
if (seed != null) {
World world = getServer().createWorld(name, environment, seed);
worlds.put(name, new MVWorld(world, configWorlds, this, seed)); // Place the World into the HashMap.
// configWorlds.setProperty("worlds." + world.getName() + ".environment", environment.toString());
// configWorlds.save();
System.out.print("Seed - " + getSeed(world));
} else {
World world = getServer().createWorld(name, environment);
worlds.put(name, new MVWorld(world, configWorlds, this, null)); // Place the World into the HashMap.
// configWorlds.setProperty("worlds." + world.getName() + ".environment", environment.toString());
// configWorlds.save();
System.out.print("Seed - " + getSeed(world));
}
}