diff options
author | snowleo <schneeleo@gmail.com> | 2012-07-22 13:11:00 +0200 |
---|---|---|
committer | snowleo <schneeleo@gmail.com> | 2012-07-22 13:11:00 +0200 |
commit | b76f5c71a3cead60ad20500d577d0b6d3123ec95 (patch) | |
tree | 62900357bf787eeebcd64a7b0e7a9990f8f17760 | |
parent | a181e6d7b2b2c6ff483e7097eceeaa8ee747947a (diff) | |
download | Essentials-b76f5c71a3cead60ad20500d577d0b6d3123ec95.tar Essentials-b76f5c71a3cead60ad20500d577d0b6d3123ec95.tar.gz Essentials-b76f5c71a3cead60ad20500d577d0b6d3123ec95.tar.lz Essentials-b76f5c71a3cead60ad20500d577d0b6d3123ec95.tar.xz Essentials-b76f5c71a3cead60ad20500d577d0b6d3123ec95.zip |
Fix StoredLocation
-rw-r--r-- | Essentials/src/net/ess3/storage/StoredLocation.java | 22 |
1 files changed, 3 insertions, 19 deletions
diff --git a/Essentials/src/net/ess3/storage/StoredLocation.java b/Essentials/src/net/ess3/storage/StoredLocation.java index 00ace6791..974204bf6 100644 --- a/Essentials/src/net/ess3/storage/StoredLocation.java +++ b/Essentials/src/net/ess3/storage/StoredLocation.java @@ -1,16 +1,14 @@ package net.ess3.storage; -import net.ess3.api.server.World; -import net.ess3.api.server.Location; import java.lang.ref.WeakReference; -import java.util.UUID; +import net.ess3.api.server.Location; +import net.ess3.api.server.World; public class StoredLocation { private WeakReference<Location> location; private final String worldname; - private UUID worldUID = null; private final double x; private final double y; private final double z; @@ -21,7 +19,6 @@ public class StoredLocation { location = new WeakReference<Location>(loc); worldname = loc.getWorld().getName(); - worldUID = loc.getWorld().getUID(); x = loc.getX(); y = loc.getY(); z = loc.getZ(); @@ -55,20 +52,7 @@ public class StoredLocation Location loc = location == null ? null : location.get(); if (loc == null) { - World world = null; - if (worldUID != null) - { - world = Bukkit.getWorld(worldUID); - } - if (world == null) - { - world = Bukkit.getWorld(worldname); - } - if (world == null) - { - throw new WorldNotLoadedException(worldname); - } - loc = Location.create(world, getX(), getY(), getZ(), getYaw(), getPitch()); + loc = Location.create(worldname, getX(), getY(), getZ(), getYaw(), getPitch()); location = new WeakReference<Location>(loc); } return loc; |