mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-02-11 11:49:12 +00: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:
parent
6f16650e7d
commit
9d9adaa0b5
1 changed files with 6 additions and 2 deletions
|
@ -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));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue