From 20c3b516cc4317699c831ac42127735983196a76 Mon Sep 17 00:00:00 2001 From: Eric Stokes Date: Sat, 18 Jun 2011 14:53:51 -0600 Subject: [PATCH] Fix seed not being added Remove test methods Bits of refactoring --- src/com/onarandombox/MultiverseCore/MVWorld.java | 10 +++++++--- .../onarandombox/MultiverseCore/MultiverseCore.java | 6 ------ 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/com/onarandombox/MultiverseCore/MVWorld.java b/src/com/onarandombox/MultiverseCore/MVWorld.java index ed9ca6c1..68a3b912 100644 --- a/src/com/onarandombox/MultiverseCore/MVWorld.java +++ b/src/com/onarandombox/MultiverseCore/MVWorld.java @@ -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()).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()).size() == 0) { +// addSampleData(); +// } } private void initLists() { diff --git a/src/com/onarandombox/MultiverseCore/MultiverseCore.java b/src/com/onarandombox/MultiverseCore/MultiverseCore.java index e55c866e..013ef812 100644 --- a/src/com/onarandombox/MultiverseCore/MultiverseCore.java +++ b/src/com/onarandombox/MultiverseCore/MultiverseCore.java @@ -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)); } }