Made things cleaner

This commit is contained in:
bm01
2012-06-25 14:30:55 +02:00
parent 76afd5a7ca
commit b8e9269488
5 changed files with 26 additions and 20 deletions

View File

@@ -284,20 +284,11 @@ public class mcMMO extends JavaPlugin {
*/
@Override
public void onDisable() {
//Make sure to save player information if the server shuts down
for (PlayerProfile playerProfile : Users.getProfiles().values()) {
playerProfile.save();
}
Users.saveAll(); //Make sure to save player information if the server shuts down
PartyManager.getInstance().saveParties();
getServer().getScheduler().cancelTasks(this); //This removes our tasks
//Save our metadata
placeStore.saveAll();
//Cleanup empty metadata stores
placeStore.cleanUp();
placeStore.saveAll(); //Save our metadata
placeStore.cleanUp(); //Cleanup empty metadata stores
//Remove other tasks BEFORE starting the Backup, or we just cancel it straight away.
try {