From f6ccc7b0892d55423af65905f00b0ef4de599955 Mon Sep 17 00:00:00 2001 From: snowleo Date: Fri, 1 Apr 2011 23:35:10 +0000 Subject: [PATCH] [trunk] Fixed multiworld support for /home git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1088 e251c2fe-e539-e718-e476-b85c1f46cddb --- Essentials/src/com/earth2me/essentials/User.java | 10 ++++++---- 1 file 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 { List vals = (List)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 Map gdata = Essentials.getData(this); List vals = (List)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),