From afaeb8e24e882525bd572b62ccdf4b9e85907578 Mon Sep 17 00:00:00 2001 From: PikaMug Date: Wed, 25 Sep 2019 23:06:54 -0400 Subject: [PATCH] Clarify offer/accept prompt names --- main/src/main/java/me/blackvein/quests/Quests.java | 10 +++++----- .../{QuestAcceptPrompt.java => QuestOfferPrompt.java} | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) rename main/src/main/java/me/blackvein/quests/prompts/{QuestAcceptPrompt.java => QuestOfferPrompt.java} (95%) diff --git a/main/src/main/java/me/blackvein/quests/Quests.java b/main/src/main/java/me/blackvein/quests/Quests.java index e69378348..1fe647754 100644 --- a/main/src/main/java/me/blackvein/quests/Quests.java +++ b/main/src/main/java/me/blackvein/quests/Quests.java @@ -85,7 +85,7 @@ import me.blackvein.quests.listeners.DungeonsListener; import me.blackvein.quests.listeners.NpcListener; import me.blackvein.quests.listeners.PartiesListener; import me.blackvein.quests.listeners.PlayerListener; -import me.blackvein.quests.prompts.QuestAcceptPrompt; +import me.blackvein.quests.prompts.QuestOfferPrompt; import me.blackvein.quests.util.ItemUtil; import me.blackvein.quests.util.Lang; import me.blackvein.quests.util.LocaleQuery; @@ -180,9 +180,9 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener // 9 - Setup conversation factory after timeout has loaded this.conversationFactory = new ConversationFactory(this).withModality(false).withPrefix(new QuestsPrefix()) - .withFirstPrompt(new QuestPrompt()).withTimeout(settings.getAcceptTimeout()) + .withFirstPrompt(new QuestAcceptPrompt()).withTimeout(settings.getAcceptTimeout()) .thatExcludesNonPlayersWithMessage("Console may not perform this conversation!").addConversationAbandonedListener(this); - this.npcConversationFactory = new ConversationFactory(this).withModality(false).withFirstPrompt(new QuestAcceptPrompt(this)) + this.npcConversationFactory = new ConversationFactory(this).withModality(false).withFirstPrompt(new QuestOfferPrompt(this)) .withTimeout(settings.getAcceptTimeout()).withLocalEcho(false).addConversationAbandonedListener(this); // 10 - Register listeners @@ -347,7 +347,7 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener } } - private class QuestPrompt extends StringPrompt { + private class QuestAcceptPrompt extends StringPrompt { @Override public String getPromptText(ConversationContext context) { @@ -378,7 +378,7 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener msg.replace("", Lang.get(player, "yesWord")); msg.replace("", Lang.get(player, "noWord")); player.sendMessage(ChatColor.RED + msg); - return new QuestPrompt(); + return new QuestAcceptPrompt(); } } } diff --git a/main/src/main/java/me/blackvein/quests/prompts/QuestAcceptPrompt.java b/main/src/main/java/me/blackvein/quests/prompts/QuestOfferPrompt.java similarity index 95% rename from main/src/main/java/me/blackvein/quests/prompts/QuestAcceptPrompt.java rename to main/src/main/java/me/blackvein/quests/prompts/QuestOfferPrompt.java index 6906f9b44..06ef5c7ae 100644 --- a/main/src/main/java/me/blackvein/quests/prompts/QuestAcceptPrompt.java +++ b/main/src/main/java/me/blackvein/quests/prompts/QuestOfferPrompt.java @@ -28,13 +28,13 @@ import me.blackvein.quests.Quester; import me.blackvein.quests.Quests; import me.blackvein.quests.util.Lang; -public class QuestAcceptPrompt extends StringPrompt { +public class QuestOfferPrompt extends StringPrompt { private final Quests plugin; private Quester quester; private LinkedList quests; - public QuestAcceptPrompt(Quests plugin) { + public QuestOfferPrompt(Quests plugin) { this.plugin = plugin; } @@ -96,7 +96,7 @@ public class QuestAcceptPrompt extends StringPrompt { } if (q == null) { cc.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("invalidOption")); - return new QuestAcceptPrompt(plugin); + return new QuestOfferPrompt(plugin); } else { Player player = quester.getPlayer(); if (!quester.getCompletedQuests().contains(q.getName())) {