mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-13 18:14:38 +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:
@@ -139,12 +139,16 @@ public class EssentialsUpgrade
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
EssentialsConf config = new EssentialsConf(file);
|
EssentialsConf config = new EssentialsConf(file);
|
||||||
|
config.load();
|
||||||
if (config.hasProperty("home") && !config.hasProperty("home.default"))
|
if (config.hasProperty("home") && !config.hasProperty("home.default"))
|
||||||
{
|
{
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
List<Object> vals = (List<Object>)config.getProperty("home");
|
List<Object> vals = (List<Object>)config.getProperty("home");
|
||||||
World world = ess.getServer() == null ? null : ess.getServer().getWorlds().get(0);
|
if (vals == null) {
|
||||||
if (vals.size() > 5 && ess.getServer() != null)
|
continue;
|
||||||
|
}
|
||||||
|
World world = ess.getServer().getWorlds().get(0);
|
||||||
|
if (vals.size() > 5)
|
||||||
{
|
{
|
||||||
world = ess.getServer().getWorld((String)vals.get(5));
|
world = ess.getServer().getWorld((String)vals.get(5));
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user