[trunk] UserData: Catch null location in getHome

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1174 e251c2fe-e539-e718-e476-b85c1f46cddb
This commit is contained in:
snowleo 2011-04-11 00:35:56 +00:00
parent 48a39e8779
commit 545fcccaf7

View File

@ -86,7 +86,11 @@ public abstract class UserData extends PlayerExtension implements IConf {
String defaultWorld = config.getString("home.default");
worldHome = "home.worlds." + defaultWorld;
}
return config.getLocation(worldHome, getServer());
Location loc = config.getLocation(worldHome, getServer());
if (loc == null) {
throw new Exception();
}
return loc;
} else {
throw new Exception("You have not set a home.");
}