From 5b31dcadedab89340f75835ea8fccad7453ec2ce Mon Sep 17 00:00:00 2001 From: PikaMug <2267126+PikaMug@users.noreply.github.com> Date: Sat, 7 Nov 2020 00:21:00 -0500 Subject: [PATCH] Correct month prompt from requesting year in Planner --- .../quests/convo/quests/planner/DateTimePrompt.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/main/src/main/java/me/blackvein/quests/convo/quests/planner/DateTimePrompt.java b/main/src/main/java/me/blackvein/quests/convo/quests/planner/DateTimePrompt.java index d57e1f299..421d177f4 100644 --- a/main/src/main/java/me/blackvein/quests/convo/quests/planner/DateTimePrompt.java +++ b/main/src/main/java/me/blackvein/quests/convo/quests/planner/DateTimePrompt.java @@ -53,6 +53,14 @@ public class DateTimePrompt extends QuestsEditorNumericPrompt { public String getDataText(final ConversationContext context) { String dateData = ""; + if (context.getSessionData("tempYear") == null + || context.getSessionData("tempMonth") == null + || context.getSessionData("tempDay") == null + || context.getSessionData("tempHour") == null + || context.getSessionData("tempMinute") == null + || context.getSessionData("tempSecond") == null) { + return dateData; + } final Calendar cal = Calendar.getInstance(); final SimpleDateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy"); final SimpleDateFormat timeFormat = new SimpleDateFormat("HH:mm:ss"); @@ -332,7 +340,7 @@ public class DateTimePrompt extends QuestsEditorNumericPrompt { @Override public String getQueryText(final ConversationContext context) { - return Lang.get("dateCreateEnterYear"); + return Lang.get("dateCreateEnterMonth"); } @Override