Skip default home if it's invalid.

This commit is contained in:
KHobbits 2011-08-24 03:49:35 +01:00
parent 30f0f78efc
commit 6c738294d1

View File

@ -281,9 +281,10 @@ public class EssentialsUpgrade
@SuppressWarnings("unchecked")
final String defworld = (String)config.getProperty("home.default");
final Location defloc = config.getLocation("home.worlds." + defworld, ess.getServer());
;
config.setProperty("homes.home", defloc);
if (defloc != null)
{
config.setProperty("homes.home", defloc);
}
List<String> worlds = config.getKeys("home.worlds");
Location loc;