From 9d44da2daa0c1950afb5fc737fa5028d29d50989 Mon Sep 17 00:00:00 2001 From: Zrips Date: Fri, 19 Feb 2021 14:52:24 +0200 Subject: [PATCH] We need to save jobs into archive when firing everyone from one --- src/main/java/com/gamingmesh/jobs/CMILib/CMIEnchantment.java | 1 - src/main/java/com/gamingmesh/jobs/commands/list/fireall.java | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/gamingmesh/jobs/CMILib/CMIEnchantment.java b/src/main/java/com/gamingmesh/jobs/CMILib/CMIEnchantment.java index 18225e6f..5a24c6a3 100644 --- a/src/main/java/com/gamingmesh/jobs/CMILib/CMIEnchantment.java +++ b/src/main/java/com/gamingmesh/jobs/CMILib/CMIEnchantment.java @@ -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) { diff --git a/src/main/java/com/gamingmesh/jobs/commands/list/fireall.java b/src/main/java/com/gamingmesh/jobs/commands/list/fireall.java index b37c2d28..b7440fe0 100644 --- a/src/main/java/com/gamingmesh/jobs/commands/list/fireall.java +++ b/src/main/java/com/gamingmesh/jobs/commands/list/fireall.java @@ -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);