From 58eeecbcb87aff10f2b3881694ead8d75d6f103f Mon Sep 17 00:00:00 2001 From: Jeremy Wood Date: Fri, 23 Nov 2012 11:49:14 -0500 Subject: [PATCH] Fixed issue where Multiverse always checks block safety to fix world spawns on startup/reload. --- .../java/com/onarandombox/MultiverseCore/MVWorld.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/onarandombox/MultiverseCore/MVWorld.java b/src/main/java/com/onarandombox/MultiverseCore/MVWorld.java index d1178791..7380213c 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/MVWorld.java +++ b/src/main/java/com/onarandombox/MultiverseCore/MVWorld.java @@ -71,11 +71,15 @@ public class MVWorld implements MultiverseWorld { final Location worldSpawnLocation = readSpawnFromWorld(world); this.props.setValidator("spawn", spawnValidator); if (this.props.spawnLocation instanceof NullLocation) { - this.props.spawnLocation = new SpawnLocation(worldSpawnLocation); + final SpawnLocation newLoc = new SpawnLocation(worldSpawnLocation); + this.props.spawnLocation = newLoc; + world.setSpawnLocation(newLoc.getBlockX(), newLoc.getBlockY(), newLoc.getBlockZ()); } else { this.props.spawnLocation.setWorld(world); if (plugin.getBlockSafety().playerCanSpawnHereSafely(this.props.spawnLocation)) { - this.props.spawnLocation = new SpawnLocation(worldSpawnLocation); + final SpawnLocation newLoc = new SpawnLocation(worldSpawnLocation); + this.props.spawnLocation = newLoc; + world.setSpawnLocation(newLoc.getBlockX(), newLoc.getBlockY(), newLoc.getBlockZ()); } }