From 876456b9327da6d964a90dd88f3d5ecc2ed8827a Mon Sep 17 00:00:00 2001 From: Jeremy Wood Date: Mon, 19 Nov 2012 14:05:07 -0500 Subject: [PATCH] Fixed up some migration issues caused by WorldProperties refactor. Fixes #968. --- .../com/onarandombox/MultiverseCore/MultiverseCore.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/onarandombox/MultiverseCore/MultiverseCore.java b/src/main/java/com/onarandombox/MultiverseCore/MultiverseCore.java index 6ab02def..5029f9ea 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/MultiverseCore.java +++ b/src/main/java/com/onarandombox/MultiverseCore/MultiverseCore.java @@ -11,6 +11,7 @@ import buscript.Buscript; import com.dumptruckman.minecraft.util.Logging; import com.fernferret.allpay.AllPay; import com.fernferret.allpay.GenericBank; +import com.onarandombox.MultiverseCore.MVWorld.NullLocation; import com.onarandombox.MultiverseCore.api.BlockSafety; import com.onarandombox.MultiverseCore.api.Core; import com.onarandombox.MultiverseCore.api.LocationManipulation; @@ -667,7 +668,7 @@ public class MultiverseCore extends JavaPlugin implements MVPlugin, Core { // migrate portalform if (section.isString("portalform")) { try { - world.setPropertyValue("portalform", section.getString("portalform")); + world.setProperty("portalform", section.getString("portalform"), true); } catch (NoSuchPropertyException e) { throw new RuntimeException("Who forgot to update the migrator?", e); } @@ -676,7 +677,7 @@ public class MultiverseCore extends JavaPlugin implements MVPlugin, Core { // migrate environment if (section.isString("environment")) { try { - world.setPropertyValue("environment", section.getString("environment")); + world.setProperty("environment", section.getString("environment"), true); } catch (NoSuchPropertyException e) { throw new RuntimeException("Who forgot to update the migrator?", e); } @@ -715,7 +716,7 @@ public class MultiverseCore extends JavaPlugin implements MVPlugin, Core { // migrate spawn if (section.isConfigurationSection("spawn")) { ConfigurationSection spawnSect = section.getConfigurationSection("spawn"); - Location spawnLoc = world.getSpawnLocation(); + Location spawnLoc = new NullLocation(); if (spawnSect.isDouble("yaw")) spawnLoc.setYaw((float) spawnSect.getDouble("yaw")); if (spawnSect.isDouble("pitch"))