summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsnowleo <snowleo@e251c2fe-e539-e718-e476-b85c1f46cddb>2011-05-16 08:55:20 +0000
committersnowleo <snowleo@e251c2fe-e539-e718-e476-b85c1f46cddb>2011-05-16 08:55:20 +0000
commitbb804a57102f650ab4da05d7f829e7e12315b18d (patch)
tree1f692a4f6d13f45969fbc04d2ce89f3618a325c3
parent62fe52ee1308052220fb801855eb548cf1f731c7 (diff)
downloadEssentials-bb804a57102f650ab4da05d7f829e7e12315b18d.tar
Essentials-bb804a57102f650ab4da05d7f829e7e12315b18d.tar.gz
Essentials-bb804a57102f650ab4da05d7f829e7e12315b18d.tar.lz
Essentials-bb804a57102f650ab4da05d7f829e7e12315b18d.tar.xz
Essentials-bb804a57102f650ab4da05d7f829e7e12315b18d.zip
Fix _setMoney failing on upgrade.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1500 e251c2fe-e539-e718-e476-b85c1f46cddb
-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();
+ }
}