summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Essentials/src/com/earth2me/essentials/Essentials.java2
-rw-r--r--Essentials/src/com/earth2me/essentials/EssentialsUpgrade.java26
2 files changed, 19 insertions, 9 deletions
diff --git a/Essentials/src/com/earth2me/essentials/Essentials.java b/Essentials/src/com/earth2me/essentials/Essentials.java
index 023e8d0ee..9af6e10de 100644
--- a/Essentials/src/com/earth2me/essentials/Essentials.java
+++ b/Essentials/src/com/earth2me/essentials/Essentials.java
@@ -99,9 +99,11 @@ public class Essentials extends JavaPlugin
{
setStatic();
EssentialsUpgrade upgrade = new EssentialsUpgrade(this.getDescription().getVersion(), this);
+ upgrade.beforeSettings();
confList = new ArrayList<IConf>();
settings = new Settings(this.getDataFolder());
confList.add(settings);
+ upgrade.afterSettings();
Util.updateLocale(settings.getLocale(), this.getDataFolder());
spawn = new Spawn(getServer(), this.getDataFolder());
confList.add(spawn);
diff --git a/Essentials/src/com/earth2me/essentials/EssentialsUpgrade.java b/Essentials/src/com/earth2me/essentials/EssentialsUpgrade.java
index f941ba0e3..31efc87fa 100644
--- a/Essentials/src/com/earth2me/essentials/EssentialsUpgrade.java
+++ b/Essentials/src/com/earth2me/essentials/EssentialsUpgrade.java
@@ -28,15 +28,6 @@ public class EssentialsUpgrade
}
alreadyRun = true;
ess = essentials;
- if (!ess.getDataFolder().exists())
- {
- ess.getDataFolder().mkdirs();
- }
- moveWorthValuesToWorthYml();
- sanitizeAllUserFilenames();
- updateUsersToNewDefaultHome();
- moveUsersDataToUserdataFolder();
- convertWarps();
}
private void moveWorthValuesToWorthYml()
@@ -376,4 +367,21 @@ public class EssentialsUpgrade
}
return null;
}
+
+ void beforeSettings()
+ {
+ if (!ess.getDataFolder().exists())
+ {
+ ess.getDataFolder().mkdirs();
+ }
+ moveWorthValuesToWorthYml();
+ }
+
+ void afterSettings()
+ {
+ sanitizeAllUserFilenames();
+ updateUsersToNewDefaultHome();
+ moveUsersDataToUserdataFolder();
+ convertWarps();
+ }
}