Clear after saving, save before clearing.

This commit is contained in:
GJ 2013-04-02 08:29:38 -04:00
parent 1fb28eeee0
commit fa645b5e00
2 changed files with 7 additions and 5 deletions

View File

@ -23,6 +23,7 @@ public class MmoupdateCommand implements CommandExecutor {
switch (args.length) {
case 0:
sender.sendMessage(LocaleLoader.getString("Commands.mmoupdate.Start"));
UserManager.saveAll();
UserManager.clearAll();
convertToMySQL();

View File

@ -166,11 +166,12 @@ public class mcMMO extends JavaPlugin {
@Override
public void onDisable() {
try {
reloadDisableHelper(); // Prevent Berserk from getting "stuck"
UserManager.saveAll(); // Make sure to save player information if the server shuts down
PartyManager.saveParties();
placeStore.saveAll(); // Save our metadata
placeStore.cleanUp(); // Cleanup empty metadata stores
reloadDisableHelper(); // Prevent Berserk from getting "stuck"
UserManager.saveAll(); // Make sure to save player information if the server shuts down
UserManager.clearAll(); // Should always clear after saving
PartyManager.saveParties(); // Save our parties
placeStore.saveAll(); // Save our metadata
placeStore.cleanUp(); // Cleanup empty metadata stores
}
catch (NullPointerException e) {}