mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-12-22 17:18:37 +01:00
[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:
parent
48a39e8779
commit
545fcccaf7
@ -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.");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user