diff options
author | snowleo <schneeleo@gmail.com> | 2012-11-03 02:36:17 +0100 |
---|---|---|
committer | snowleo <schneeleo@gmail.com> | 2012-11-03 02:36:17 +0100 |
commit | 83fefefb43bdf3a70266438bee48d34fea9a2aad (patch) | |
tree | e64efd60678988877de67ab130df1204efa4e2c1 /Essentials2Compat/src/com/earth2me/essentials/EssentialsConf.java | |
parent | 59878a94e4cb4919300400bff6ff9c0bc78e4fd1 (diff) | |
download | Essentials-83fefefb43bdf3a70266438bee48d34fea9a2aad.tar Essentials-83fefefb43bdf3a70266438bee48d34fea9a2aad.tar.gz Essentials-83fefefb43bdf3a70266438bee48d34fea9a2aad.tar.lz Essentials-83fefefb43bdf3a70266438bee48d34fea9a2aad.tar.xz Essentials-83fefefb43bdf3a70266438bee48d34fea9a2aad.zip |
Ess2Compat: Convert user files
Diffstat (limited to 'Essentials2Compat/src/com/earth2me/essentials/EssentialsConf.java')
-rw-r--r-- | Essentials2Compat/src/com/earth2me/essentials/EssentialsConf.java | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/Essentials2Compat/src/com/earth2me/essentials/EssentialsConf.java b/Essentials2Compat/src/com/earth2me/essentials/EssentialsConf.java index cbc51eddd..1ca764954 100644 --- a/Essentials2Compat/src/com/earth2me/essentials/EssentialsConf.java +++ b/Essentials2Compat/src/com/earth2me/essentials/EssentialsConf.java @@ -14,6 +14,7 @@ import java.util.Locale; import java.util.Map; import java.util.logging.Level; import java.util.logging.Logger; +import net.ess3.storage.StoredLocation; import org.bukkit.Location; import org.bukkit.Material; import org.bukkit.Server; @@ -238,19 +239,14 @@ public class EssentialsConf extends YamlConfiguration return isSet(path); } - public Location getLocation(final String path, final Server server) throws Exception + public StoredLocation getLocation(final String path, final Server server) throws Exception { final String worldName = getString((path == null ? "" : path + ".") + "world"); if (worldName == null || worldName.isEmpty()) { return null; } - final World world = server.getWorld(worldName); - if (world == null) - { - throw new Exception(_("invalidWorld")); - } - return new Location(world, + return new StoredLocation(worldName, getDouble((path == null ? "" : path + ".") + "x", 0), getDouble((path == null ? "" : path + ".") + "y", 0), getDouble((path == null ? "" : path + ".") + "z", 0), |