diff options
author | md_5 <md_5@bigpond.com> | 2012-06-27 20:27:27 +1000 |
---|---|---|
committer | md_5 <md_5@bigpond.com> | 2012-06-27 20:27:27 +1000 |
commit | 06f54fdbac1874c549b5181d92b4a9474da55dcc (patch) | |
tree | 0390c78353d15cc239512fd2b9a1990df58b7300 /Essentials2Compat/src/com/earth2me/essentials/EssentialsUpgrade.java | |
parent | 4561a7f0106adb7bd62e2d42114cb80a3a30b570 (diff) | |
download | Essentials-06f54fdbac1874c549b5181d92b4a9474da55dcc.tar Essentials-06f54fdbac1874c549b5181d92b4a9474da55dcc.tar.gz Essentials-06f54fdbac1874c549b5181d92b4a9474da55dcc.tar.lz Essentials-06f54fdbac1874c549b5181d92b4a9474da55dcc.tar.xz Essentials-06f54fdbac1874c549b5181d92b4a9474da55dcc.zip |
That just leaves the big ol' core. Largely ignore Compat as it is very temporary.
Diffstat (limited to 'Essentials2Compat/src/com/earth2me/essentials/EssentialsUpgrade.java')
-rw-r--r-- | Essentials2Compat/src/com/earth2me/essentials/EssentialsUpgrade.java | 105 |
1 files changed, 52 insertions, 53 deletions
diff --git a/Essentials2Compat/src/com/earth2me/essentials/EssentialsUpgrade.java b/Essentials2Compat/src/com/earth2me/essentials/EssentialsUpgrade.java index 865af41e3..d912caf7e 100644 --- a/Essentials2Compat/src/com/earth2me/essentials/EssentialsUpgrade.java +++ b/Essentials2Compat/src/com/earth2me/essentials/EssentialsUpgrade.java @@ -386,7 +386,6 @@ public class EssentialsUpgrade * ((Number)vals.get(4)).floatValue())); } } } } usersFile.renameTo(new File(usersFile.getAbsolutePath() + ".old")); * } */ - private void convertWarps() { final File warpsFolder = new File(ess.getDataFolder(), "warps"); @@ -461,56 +460,56 @@ public class EssentialsUpgrade } /*final File warpFile = new File(ess.getDataFolder(), "warps.txt"); - if (warpFile.exists()) - { - try - { - final BufferedReader rx = new BufferedReader(new FileReader(warpFile)); - try - { - for (String[] parts = new String[0]; rx.ready(); parts = rx.readLine().split(":")) - { - if (parts.length < 6) - { - continue; - } - final String name = parts[0]; - final double x = Double.parseDouble(parts[1].trim()); - final double y = Double.parseDouble(parts[2].trim()); - final double z = Double.parseDouble(parts[3].trim()); - final float yaw = Float.parseFloat(parts[4].trim()); - final float pitch = Float.parseFloat(parts[5].trim()); - if (name.isEmpty()) - { - continue; - } - World w = null; - for (World world : ess.getServer().getWorlds()) - { - if (world.getEnvironment() != World.Environment.NETHER) - { - w = world; - break; - } - } - final Location loc = new Location(name, x, y, z, yaw, pitch); - ess.getWarps().setWarp(name, loc); - if (!warpFile.renameTo(new File(ess.getDataFolder(), "warps.txt.old"))) - { - throw new Exception(_("fileRenameError", "warps.txt")); - } - } - } - finally - { - rx.close(); - } - } - catch (Exception ex) - { - LOGGER.log(Level.SEVERE, null, ex); - } - }*/ + if (warpFile.exists()) + { + try + { + final BufferedReader rx = new BufferedReader(new FileReader(warpFile)); + try + { + for (String[] parts = new String[0]; rx.ready(); parts = rx.readLine().split(":")) + { + if (parts.length < 6) + { + continue; + } + final String name = parts[0]; + final double x = Double.parseDouble(parts[1].trim()); + final double y = Double.parseDouble(parts[2].trim()); + final double z = Double.parseDouble(parts[3].trim()); + final float yaw = Float.parseFloat(parts[4].trim()); + final float pitch = Float.parseFloat(parts[5].trim()); + if (name.isEmpty()) + { + continue; + } + World w = null; + for (World world : ess.getServer().getWorlds()) + { + if (world.getEnvironment() != World.Environment.NETHER) + { + w = world; + break; + } + } + final Location loc = new Location(name, x, y, z, yaw, pitch); + ess.getWarps().setWarp(name, loc); + if (!warpFile.renameTo(new File(ess.getDataFolder(), "warps.txt.old"))) + { + throw new Exception(_("fileRenameError", "warps.txt")); + } + } + } + finally + { + rx.close(); + } + } + catch (Exception ex) + { + LOGGER.log(Level.SEVERE, null, ex); + } + }*/ } /* @@ -532,7 +531,7 @@ public class EssentialsUpgrade * ess.getDataFolder().getParentFile().getParentFile(); final File worldDirectory = new File(bukkitDirectory, name); * if (worldDirectory.exists() && worldDirectory.isDirectory()) { return new FakeWorld(worldDirectory.getName(), * World.Environment.NORMAL); } return null; - } + } */ public Location getFakeLocation(EssentialsConf config, String path) { @@ -697,7 +696,7 @@ public class EssentialsUpgrade return; } //todo - metrics - // ess.getSettings().setMetricsEnabled(false); + // ess.getSettings().setMetricsEnabled(false); doneFile.setProperty("warnMetrics", true); doneFile.save(); } |