From 0ceb49236e215cccf1123d7d571fcd5d18137023 Mon Sep 17 00:00:00 2001 From: PikaMug <2267126+PikaMug@users.noreply.github.com> Date: Thu, 29 Jul 2021 05:56:05 -0400 Subject: [PATCH] Descriptive notice for Trial Mode, fixes #1737 --- .../quests/convo/actions/main/ActionMainPrompt.java | 6 ++++-- .../quests/convo/conditions/main/ConditionMainPrompt.java | 3 ++- .../blackvein/quests/convo/quests/main/QuestMainPrompt.java | 3 ++- main/src/main/resources/strings.yml | 2 ++ 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/main/src/main/java/me/blackvein/quests/convo/actions/main/ActionMainPrompt.java b/main/src/main/java/me/blackvein/quests/convo/actions/main/ActionMainPrompt.java index 2cbf31085..953e96125 100644 --- a/main/src/main/java/me/blackvein/quests/convo/actions/main/ActionMainPrompt.java +++ b/main/src/main/java/me/blackvein/quests/convo/actions/main/ActionMainPrompt.java @@ -207,7 +207,8 @@ public class ActionMainPrompt extends ActionsEditorNumericPrompt { if (!plugin.hasLimitedAccess(context.getForWhom())) { return new ActionDenizenPrompt(context); } else { - context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("noPermission")); + context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("modeDeny") + .replace("mode", Lang.get("trialMode"))); return new ActionMainPrompt(context); } case 8: @@ -1032,7 +1033,8 @@ public class ActionMainPrompt extends ActionsEditorNumericPrompt { public Prompt acceptInput(final ConversationContext context, final String input) { if (input.equalsIgnoreCase("1") || input.equalsIgnoreCase(Lang.get("yesWord"))) { if (plugin.hasLimitedAccess(context.getForWhom()) && !plugin.getSettings().canTrialSave()) { - context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("noPermission")); + context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("modeDeny") + .replace("mode", Lang.get("trialMode"))); return new ActionMainPrompt(context); } plugin.getActionFactory().saveAction(context); diff --git a/main/src/main/java/me/blackvein/quests/convo/conditions/main/ConditionMainPrompt.java b/main/src/main/java/me/blackvein/quests/convo/conditions/main/ConditionMainPrompt.java index 40a470694..4f3ef38b6 100644 --- a/main/src/main/java/me/blackvein/quests/convo/conditions/main/ConditionMainPrompt.java +++ b/main/src/main/java/me/blackvein/quests/convo/conditions/main/ConditionMainPrompt.java @@ -527,7 +527,8 @@ public class ConditionMainPrompt extends ConditionsEditorNumericPrompt { public Prompt acceptInput(final ConversationContext context, final String input) { if (input.equalsIgnoreCase("1") || input.equalsIgnoreCase(Lang.get("yesWord"))) { if (plugin.hasLimitedAccess(context.getForWhom()) && !plugin.getSettings().canTrialSave()) { - context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("noPermission")); + context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("modeDeny") + .replace("mode", Lang.get("trialMode"))); return new ConditionMainPrompt(context); } plugin.getConditionFactory().saveCondition(context); diff --git a/main/src/main/java/me/blackvein/quests/convo/quests/main/QuestMainPrompt.java b/main/src/main/java/me/blackvein/quests/convo/quests/main/QuestMainPrompt.java index 416400bed..f8542acdd 100644 --- a/main/src/main/java/me/blackvein/quests/convo/quests/main/QuestMainPrompt.java +++ b/main/src/main/java/me/blackvein/quests/convo/quests/main/QuestMainPrompt.java @@ -814,7 +814,8 @@ public class QuestMainPrompt extends QuestsEditorNumericPrompt { public Prompt acceptInput(final ConversationContext context, final String input) { if (input.equalsIgnoreCase("1") || input.equalsIgnoreCase(Lang.get("yesWord"))) { if (plugin.hasLimitedAccess(context.getForWhom()) && !plugin.getSettings().canTrialSave()) { - context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("noPermission")); + context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("modeDeny") + .replace("mode", Lang.get("trialMode"))); return new QuestMainPrompt(context); } if (context.getSessionData(CK.Q_ASK_MESSAGE) == null) { diff --git a/main/src/main/resources/strings.yml b/main/src/main/resources/strings.yml index 5d04fe677..b5fb65d44 100644 --- a/main/src/main/resources/strings.yml +++ b/main/src/main/resources/strings.yml @@ -801,6 +801,8 @@ timePrompt: "Enter amount of time (in seconds), , " timerMessage: "Time left to finish the quest/stage: