From 711d42d6042e1700abe33b4832eeb75d6e1a9a12 Mon Sep 17 00:00:00 2001 From: snowleo Date: Sun, 8 Apr 2012 00:07:53 +0200 Subject: Server-Layer Part 1 --- .../src/com/earth2me/essentials/EssentialsUpgrade.java | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'Essentials2Compat/src') diff --git a/Essentials2Compat/src/com/earth2me/essentials/EssentialsUpgrade.java b/Essentials2Compat/src/com/earth2me/essentials/EssentialsUpgrade.java index ccaa6e4a4..e9d2b670e 100644 --- a/Essentials2Compat/src/com/earth2me/essentials/EssentialsUpgrade.java +++ b/Essentials2Compat/src/com/earth2me/essentials/EssentialsUpgrade.java @@ -5,7 +5,7 @@ import com.earth2me.essentials.storage.ManagedFile; import static com.earth2me.essentials.I18n._; import com.earth2me.essentials.api.IEssentials; import com.earth2me.essentials.settings.Spawns; -import com.earth2me.essentials.storage.Location; +import com.earth2me.essentials.storage.StoredLocation; import com.earth2me.essentials.storage.YamlStorageWriter; import java.io.*; import java.math.BigInteger; @@ -215,7 +215,7 @@ public class EssentialsUpgrade World world = ess.getServer().getWorlds().get(0); if (world != null) { - final Location loc = new Location( + final StoredLocation loc = new StoredLocation( (String)vals.get(5), ((Number)vals.get(0)).doubleValue(), ((Number)vals.get(1)).doubleValue(), @@ -325,14 +325,14 @@ public class EssentialsUpgrade { @SuppressWarnings("unchecked") final String defworld = (String)config.getProperty("home.default"); - final Location defloc = getFakeLocation(config, "home.worlds." + defworld); + final StoredLocation defloc = getFakeLocation(config, "home.worlds." + defworld); if (defloc != null) { config.setProperty("homes.home", defloc); } Set worlds = config.getConfigurationSection("home.worlds").getKeys(false); - Location loc; + StoredLocation loc; String worldName; if (worlds == null) @@ -443,7 +443,7 @@ public class EssentialsUpgrade } if (worldName != null) { - final Location loc = new Location(worldName, x, y, z, yaw, pitch); + final StoredLocation loc = new StoredLocation(worldName, x, y, z, yaw, pitch); ((Warps)ess.getWarps()).setWarp(filename.substring(0, filename.length() - 4), loc); if (!listOfFiles[i].renameTo(new File(warpsFolder, filename + ".old"))) { @@ -534,14 +534,14 @@ public class EssentialsUpgrade * World.Environment.NORMAL); } return null; } */ - public Location getFakeLocation(EssentialsConf config, String path) + public StoredLocation getFakeLocation(EssentialsConf config, String path) { String worldName = config.getString((path != null ? path + "." : "") + "world"); if (worldName == null || worldName.isEmpty()) { return null; } - return new Location(worldName, + return new StoredLocation(worldName, config.getDouble((path != null ? path + "." : "") + "x", 0), config.getDouble((path != null ? path + "." : "") + "y", 0), config.getDouble((path != null ? path + "." : "") + "z", 0), @@ -616,7 +616,7 @@ public class EssentialsUpgrade Set keys = config.getKeys(false); for (String group : keys) { - Location loc = getFakeLocation(config, group); + StoredLocation loc = getFakeLocation(config, group); spawns.getSpawns().put(group.toLowerCase(Locale.ENGLISH), loc); } if (!configFile.renameTo(new File(ess.getDataFolder(), "spawn.yml.old"))) @@ -663,7 +663,7 @@ public class EssentialsUpgrade Set keys = config.getKeys(false); for (String jailName : keys) { - Location loc = getFakeLocation(config, jailName); + StoredLocation loc = getFakeLocation(config, jailName); jails.getJails().put(jailName.toLowerCase(Locale.ENGLISH), loc); } if (!configFile.renameTo(new File(ess.getDataFolder(), "jail.yml.old"))) -- cgit v1.2.3