[trunk] Home: Catch world not loaded/unknown in server.

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1171 e251c2fe-e539-e718-e476-b85c1f46cddb
This commit is contained in:
snowleo 2011-04-10 23:35:07 +00:00
parent 471e20473b
commit d23e7a2821

View file

@ -504,6 +504,9 @@ public class User extends PlayerExtension implements Comparable<User>, IReplyTo
if (vals.size() > 5 && getServer() != null) {
world = getServer().getWorld((String)vals.get(5));
}
if (world == null) {
throw new Exception();
}
return new Location(
world,
((Number)vals.get(0)).doubleValue(),
@ -521,6 +524,9 @@ public class User extends PlayerExtension implements Comparable<User>, IReplyTo
if (vals.size() > 5) {
world = getServer().getWorld((String)vals.get(5));
}
if (world == null) {
throw new Exception();
}
return new Location(world,
((Number)vals.get(0)).doubleValue(),
((Number)vals.get(1)).doubleValue(),