From fa645b5e0070a1c892512cfb37939013b5fb9a91 Mon Sep 17 00:00:00 2001 From: GJ Date: Tue, 2 Apr 2013 08:29:38 -0400 Subject: [PATCH] Clear after saving, save before clearing. --- .../nossr50/commands/database/MmoupdateCommand.java | 1 + src/main/java/com/gmail/nossr50/mcMMO.java | 11 ++++++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/gmail/nossr50/commands/database/MmoupdateCommand.java b/src/main/java/com/gmail/nossr50/commands/database/MmoupdateCommand.java index 8492ac34e..743b4b6b6 100644 --- a/src/main/java/com/gmail/nossr50/commands/database/MmoupdateCommand.java +++ b/src/main/java/com/gmail/nossr50/commands/database/MmoupdateCommand.java @@ -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(); diff --git a/src/main/java/com/gmail/nossr50/mcMMO.java b/src/main/java/com/gmail/nossr50/mcMMO.java index ab47c9d1f..9f99bbfdc 100644 --- a/src/main/java/com/gmail/nossr50/mcMMO.java +++ b/src/main/java/com/gmail/nossr50/mcMMO.java @@ -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) {}