[trunk] Fix converting to new home format.

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1304 e251c2fe-e539-e718-e476-b85c1f46cddb
This commit is contained in:
snowleo 2011-05-02 00:20:57 +00:00
parent 6f16650e7d
commit 9d9adaa0b5

View file

@ -139,12 +139,16 @@ public class EssentialsUpgrade
continue;
}
EssentialsConf config = new EssentialsConf(file);
config.load();
if (config.hasProperty("home") && !config.hasProperty("home.default"))
{
@SuppressWarnings("unchecked")
List<Object> vals = (List<Object>)config.getProperty("home");
World world = ess.getServer() == null ? null : ess.getServer().getWorlds().get(0);
if (vals.size() > 5 && ess.getServer() != null)
if (vals == null) {
continue;
}
World world = ess.getServer().getWorlds().get(0);
if (vals.size() > 5)
{
world = ess.getServer().getWorld((String)vals.get(5));
}