From d36893ef0e8f97059be18c928a5b7892e5baa604 Mon Sep 17 00:00:00 2001 From: PikaMug <2267126+PikaMug@users.noreply.github.com> Date: Fri, 3 Apr 2020 16:17:21 -0400 Subject: [PATCH] Save the Planner cooldown/repeat-cycle as integer, fixes #1161 --- main/src/main/java/me/blackvein/quests/QuestFactory.java | 4 ++-- .../blackvein/quests/convo/quests/prompts/PlannerPrompt.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/main/src/main/java/me/blackvein/quests/QuestFactory.java b/main/src/main/java/me/blackvein/quests/QuestFactory.java index 885683beb..dd67ba1a6 100644 --- a/main/src/main/java/me/blackvein/quests/QuestFactory.java +++ b/main/src/main/java/me/blackvein/quests/QuestFactory.java @@ -1843,9 +1843,9 @@ public class QuestFactory implements ConversationAbandonedListener { pln.set("end", context.getSessionData(CK.PLN_END_DATE) != null ? (String) context.getSessionData(CK.PLN_END_DATE) : null); pln.set("repeat", context.getSessionData(CK.PLN_REPEAT_CYCLE) != null - ? (Long) context.getSessionData(CK.PLN_REPEAT_CYCLE) : null); + ? ((Long) context.getSessionData(CK.PLN_REPEAT_CYCLE) / 1000) : null); pln.set("cooldown", context.getSessionData(CK.PLN_COOLDOWN) != null - ? (Long) context.getSessionData(CK.PLN_COOLDOWN) : null); + ? ((Long) context.getSessionData(CK.PLN_COOLDOWN) / 1000) : null); if (pln.getKeys(false).isEmpty()) { section.set("planner", null); } diff --git a/main/src/main/java/me/blackvein/quests/convo/quests/prompts/PlannerPrompt.java b/main/src/main/java/me/blackvein/quests/convo/quests/prompts/PlannerPrompt.java index 3949dc358..5ba911798 100644 --- a/main/src/main/java/me/blackvein/quests/convo/quests/prompts/PlannerPrompt.java +++ b/main/src/main/java/me/blackvein/quests/convo/quests/prompts/PlannerPrompt.java @@ -97,13 +97,13 @@ public class PlannerPrompt extends QuestsEditorNumericPrompt { if (context.getSessionData(CK.PLN_START_DATE) == null) { return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")"; } else { - return ChatColor.YELLOW + " - " + getPrettyDate((String) context.getSessionData(CK.PLN_START_DATE)); + return "\n" + ChatColor.YELLOW + " - " + getPrettyDate((String) context.getSessionData(CK.PLN_START_DATE)); } case 2: if (context.getSessionData(CK.PLN_END_DATE) == null) { return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")"; } else { - return ChatColor.YELLOW + " - " + return "\n" + ChatColor.YELLOW + " - " + getPrettyDate((String) context.getSessionData(CK.PLN_END_DATE)); } case 3: