mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-14 02:24:16 +02: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:
@@ -86,7 +86,11 @@ public abstract class UserData extends PlayerExtension implements IConf {
|
|||||||
String defaultWorld = config.getString("home.default");
|
String defaultWorld = config.getString("home.default");
|
||||||
worldHome = "home.worlds." + defaultWorld;
|
worldHome = "home.worlds." + defaultWorld;
|
||||||
}
|
}
|
||||||
return config.getLocation(worldHome, getServer());
|
Location loc = config.getLocation(worldHome, getServer());
|
||||||
|
if (loc == null) {
|
||||||
|
throw new Exception();
|
||||||
|
}
|
||||||
|
return loc;
|
||||||
} else {
|
} else {
|
||||||
throw new Exception("You have not set a home.");
|
throw new Exception("You have not set a home.");
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user