1
0
mirror of https://github.com/Zrips/Jobs.git synced 2024-12-31 21:37:57 +01:00

do same stuff for leaveall as for regular leave

This commit is contained in:
Zrips 2016-06-27 14:52:46 +03:00
parent 7feced2529
commit 5414133dc3
2 changed files with 1 additions and 13 deletions

View File

@ -812,9 +812,7 @@ public class Jobs {
}
}
} else {
for (JobProgression prog : progression) {
int level = prog.getLevel();
JobInfo jobinfo = prog.getJob().getJobInfo(info, level);

View File

@ -308,20 +308,10 @@ public class PlayerManager {
* @param jPlayer
*/
public void leaveAllJobs(JobsPlayer jPlayer) {
// synchronized (jPlayer.saveLock) {
for (JobProgression job : jPlayer.getJobProgression()) {
Jobs.getJobsDAO().quitJob(jPlayer, job.getJob());
Jobs.getJobsDAO().recordToArchive(jPlayer, job.getJob());
PerformCommands.PerformCommandsOnLeave(jPlayer, job.getJob());
Jobs.leaveSlot(job.getJob());
Jobs.getSignUtil().SignUpdate(job.getJob().getName());
Jobs.getSignUtil().SignUpdate("gtoplist");
job.getJob().updateTotalPlayers();
leaveJob(jPlayer, job.getJob());
}
jPlayer.leaveAllJobs();
// }
}
/**