From 545fcccaf79bc479c54bfe0d74613d1a56e292b0 Mon Sep 17 00:00:00 2001 From: snowleo Date: Mon, 11 Apr 2011 00:35:56 +0000 Subject: [PATCH] [trunk] UserData: Catch null location in getHome git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1174 e251c2fe-e539-e718-e476-b85c1f46cddb --- Essentials/src/com/earth2me/essentials/UserData.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Essentials/src/com/earth2me/essentials/UserData.java b/Essentials/src/com/earth2me/essentials/UserData.java index 12f294dc7..5df47f323 100644 --- a/Essentials/src/com/earth2me/essentials/UserData.java +++ b/Essentials/src/com/earth2me/essentials/UserData.java @@ -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."); }