mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-05-06 15:50:43 +00: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
1 changed files with 5 additions and 1 deletions
|
@ -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 a new issue