1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-08-12 09:35:26 +02:00

[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 0e4de9e17e
commit d9294d6cbb

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));
}