mirror of
https://github.com/Zrips/Jobs.git
synced 2025-01-07 00:38:42 +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:", "");
|
String name = one.getKey().getKey().toLowerCase().replace("_", "").replace("minecraft:", "");
|
||||||
if (!map.containsKey(name)) {
|
if (!map.containsKey(name)) {
|
||||||
gmap.put(name, one);
|
gmap.put(name, one);
|
||||||
Bukkit.getConsoleSender().sendMessage(name);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
|
@ -29,6 +29,9 @@ public class fireall implements Cmd {
|
|||||||
Jobs.getDBManager().getDB().truncate(DBTables.JobsTable.getTableName());
|
Jobs.getDBManager().getDB().truncate(DBTables.JobsTable.getTableName());
|
||||||
|
|
||||||
for (JobsPlayer one : Jobs.getPlayerManager().getPlayersCache().values()) {
|
for (JobsPlayer one : Jobs.getPlayerManager().getPlayersCache().values()) {
|
||||||
|
for (JobProgression job : one.getJobProgression()) {
|
||||||
|
Jobs.getJobsDAO().recordToArchive(one, job.getJob());
|
||||||
|
}
|
||||||
one.leaveAllJobs();
|
one.leaveAllJobs();
|
||||||
// No need to save as we are clearing database with more efficient method
|
// No need to save as we are clearing database with more efficient method
|
||||||
one.setSaved(true);
|
one.setSaved(true);
|
||||||
|
Loading…
Reference in New Issue
Block a user