summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsnowleo <snowleo@e251c2fe-e539-e718-e476-b85c1f46cddb>2011-04-01 23:35:10 +0000
committersnowleo <snowleo@e251c2fe-e539-e718-e476-b85c1f46cddb>2011-04-01 23:35:10 +0000
commitf6ccc7b0892d55423af65905f00b0ef4de599955 (patch)
treee62d2fe2f1dc5a105565afeb3c92af6f6e957266
parent09006ced4f86350bca441672ee88f81c552450b8 (diff)
downloadEssentials-f6ccc7b0892d55423af65905f00b0ef4de599955.tar
Essentials-f6ccc7b0892d55423af65905f00b0ef4de599955.tar.gz
Essentials-f6ccc7b0892d55423af65905f00b0ef4de599955.tar.lz
Essentials-f6ccc7b0892d55423af65905f00b0ef4de599955.tar.xz
Essentials-f6ccc7b0892d55423af65905f00b0ef4de599955.zip
[trunk] Fixed multiworld support for /home
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1088 e251c2fe-e539-e718-e476-b85c1f46cddb
-rw-r--r--Essentials/src/com/earth2me/essentials/User.java10
1 files changed, 6 insertions, 4 deletions
diff --git a/Essentials/src/com/earth2me/essentials/User.java b/Essentials/src/com/earth2me/essentials/User.java
index c4e0cc972..f14c6bf47 100644
--- a/Essentials/src/com/earth2me/essentials/User.java
+++ b/Essentials/src/com/earth2me/essentials/User.java
@@ -492,8 +492,9 @@ public class User extends PlayerExtension implements Comparable<User>
{
List<Object> vals = (List<Object>)data.get("home");
World world = getServer() == null ? null : getServer().getWorlds().get(0);
- if (vals.size() > 5 && getServer() != null)
- getServer().getWorld((String)vals.get(5));
+ if (vals.size() > 5 && getServer() != null) {
+ world = getServer().getWorld((String)vals.get(5));
+ }
return new Location(
world,
(Double)vals.get(0),
@@ -508,8 +509,9 @@ public class User extends PlayerExtension implements Comparable<User>
Map<String, Object> gdata = Essentials.getData(this);
List<Object> vals = (List<Object>)gdata.get("home");
World world = getServer().getWorlds().get(0);
- if (vals.size() > 5)
- getServer().getWorld((String)vals.get(5));
+ if (vals.size() > 5) {
+ world = getServer().getWorld((String)vals.get(5));
+ }
return new Location(world,
(Double)vals.get(0),
(Double)vals.get(1),