mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-04-27 00:49:44 +00:00
[trunk] Another fix for upgrading the home locations
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1302 e251c2fe-e539-e718-e476-b85c1f46cddb
This commit is contained in:
parent
088508bd37
commit
c5850ddbd1
1 changed files with 15 additions and 13 deletions
|
@ -197,19 +197,21 @@ public class EssentialsUpgrade
|
|||
{
|
||||
@SuppressWarnings("unchecked")
|
||||
List<Object> vals = (List<Object>)usersConfig.getProperty(username + ".home");
|
||||
World world = ess.getServer().getWorlds().get(0);
|
||||
if (vals.size() > 5)
|
||||
{
|
||||
world = ess.getWorld((String)vals.get(5));
|
||||
}
|
||||
if (world != null)
|
||||
{
|
||||
user.setHome(new Location(world,
|
||||
((Number)vals.get(0)).doubleValue(),
|
||||
((Number)vals.get(1)).doubleValue(),
|
||||
((Number)vals.get(2)).doubleValue(),
|
||||
((Number)vals.get(3)).floatValue(),
|
||||
((Number)vals.get(4)).floatValue()), true);
|
||||
if (vals != null) {
|
||||
World world = ess.getServer().getWorlds().get(0);
|
||||
if (vals.size() > 5)
|
||||
{
|
||||
world = ess.getWorld((String)vals.get(5));
|
||||
}
|
||||
if (world != null)
|
||||
{
|
||||
user.setHome(new Location(world,
|
||||
((Number)vals.get(0)).doubleValue(),
|
||||
((Number)vals.get(1)).doubleValue(),
|
||||
((Number)vals.get(2)).doubleValue(),
|
||||
((Number)vals.get(3)).floatValue(),
|
||||
((Number)vals.get(4)).floatValue()), true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue