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:
parent
a451653820
commit
9d44da2daa
@ -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) {
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user