Save users asynchronously

This commit is contained in:
riking
2014-06-03 20:52:22 -07:00
committed by TfT_02
parent 6d719988bf
commit 4fb4d6fc0c
10 changed files with 21 additions and 12 deletions

View File

@ -422,12 +422,12 @@ public final class ExperienceAPI {
profile.addLevels(parentSkill, (levels / parentSkills.size()));
}
profile.save();
profile.scheduleAsyncSave();
return;
}
profile.addLevels(skill, levels);
profile.save();
profile.scheduleAsyncSave();
}
/**
@ -656,7 +656,7 @@ public final class ExperienceAPI {
PlayerProfile profile = getOfflineProfile(playerName);
profile.addXp(skill, XP);
profile.save();
profile.scheduleAsyncSave();
}
private static PlayerProfile getOfflineProfile(String playerName) {