diff options
author | snowleo <schneeleo@gmail.com> | 2012-04-08 00:07:53 +0200 |
---|---|---|
committer | snowleo <schneeleo@gmail.com> | 2012-04-08 00:07:53 +0200 |
commit | 711d42d6042e1700abe33b4832eeb75d6e1a9a12 (patch) | |
tree | 5197c8cb6c5cf28b18887bb0919e836a4c1aa7f3 /Essentials2Compat/src | |
parent | dc4ca6386f48b997d57d1791edc64830e886e60a (diff) | |
download | Essentials-711d42d6042e1700abe33b4832eeb75d6e1a9a12.tar Essentials-711d42d6042e1700abe33b4832eeb75d6e1a9a12.tar.gz Essentials-711d42d6042e1700abe33b4832eeb75d6e1a9a12.tar.lz Essentials-711d42d6042e1700abe33b4832eeb75d6e1a9a12.tar.xz Essentials-711d42d6042e1700abe33b4832eeb75d6e1a9a12.zip |
Server-Layer Part 1
Diffstat (limited to 'Essentials2Compat/src')
-rw-r--r-- | Essentials2Compat/src/com/earth2me/essentials/EssentialsUpgrade.java | 18 |
1 files changed, 9 insertions, 9 deletions
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<String> 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<String> 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<String> 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"))) |