1
0
mirror of https://github.com/Zrips/Jobs.git synced 2025-01-02 14:29:07 +01:00

We need to save jobs into archive when firing everyone from one

This commit is contained in:
Zrips 2021-02-19 14:52:24 +02:00
parent a451653820
commit 9d44da2daa
2 changed files with 3 additions and 1 deletions

View File

@ -150,7 +150,6 @@ public enum CMIEnchantment {
String name = one.getKey().getKey().toLowerCase().replace("_", "").replace("minecraft:", "");
if (!map.containsKey(name)) {
gmap.put(name, one);
Bukkit.getConsoleSender().sendMessage(name);
}
}
} catch (Throwable e) {

View File

@ -29,6 +29,9 @@ public class fireall implements Cmd {
Jobs.getDBManager().getDB().truncate(DBTables.JobsTable.getTableName());
for (JobsPlayer one : Jobs.getPlayerManager().getPlayersCache().values()) {
for (JobProgression job : one.getJobProgression()) {
Jobs.getJobsDAO().recordToArchive(one, job.getJob());
}
one.leaveAllJobs();
// No need to save as we are clearing database with more efficient method
one.setSaved(true);