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 bbfad59d6..9ef534a5d 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 @@ -36,7 +36,6 @@ import com.sk89q.worldguard.protection.managers.RegionManager; import me.blackvein.quests.Quest; import me.blackvein.quests.Quests; -import me.blackvein.quests.actions.Action; import me.blackvein.quests.convo.generic.ItemStackPrompt; import me.blackvein.quests.convo.quests.QuestsEditorNumericPrompt; import me.blackvein.quests.convo.quests.QuestsEditorStringPrompt; @@ -62,7 +61,7 @@ public class QuestMainPrompt extends QuestsEditorNumericPrompt { this.plugin = (Quests)context.getPlugin(); } - private final int size = 15; + private final int size = 14; @Override public int getSize() { @@ -97,22 +96,20 @@ public class QuestMainPrompt extends QuestsEditorNumericPrompt { return ChatColor.GRAY; } case 7: - return ChatColor.BLUE; - case 8: if (plugin.getDependencies().getCitizens() != null) { return ChatColor.BLUE; } else { return ChatColor.GRAY; } + case 8: case 9: case 10: case 11: case 12: - case 13: return ChatColor.BLUE; - case 14: + case 13: return ChatColor.GREEN; - case 15: + case 14: return ChatColor.RED; default: return null; @@ -147,26 +144,24 @@ public class QuestMainPrompt extends QuestsEditorNumericPrompt { return ChatColor.GRAY + Lang.get("questWGSetRegion"); } case 7: - return ChatColor.YELLOW + Lang.get("questEditorInitialEvent"); - case 8: if (plugin.getDependencies().getCitizens() != null) { return ChatColor.YELLOW + Lang.get("questEditorSetGUI"); } else { return ChatColor.GRAY + Lang.get("questEditorSetGUI"); } - case 9: + case 8: return ChatColor.DARK_AQUA + Lang.get("questEditorReqs"); - case 10: + case 9: return ChatColor.AQUA + Lang.get("questEditorPln"); - case 11: + case 10: return ChatColor.LIGHT_PURPLE + Lang.get("questEditorStages"); - case 12: + case 11: return ChatColor.DARK_PURPLE + Lang.get("questEditorRews"); - case 13: + case 12: return ChatColor.DARK_GREEN + Lang.get("questEditorOpts"); - case 14: + case 13: return ChatColor.GREEN + Lang.get("save"); - case 15: + case 14: return ChatColor.RED + Lang.get("exit"); default: return null; @@ -214,13 +209,6 @@ public class QuestMainPrompt extends QuestsEditorNumericPrompt { return ChatColor.GRAY + "(" + Lang.get("notInstalled") + ")"; } case 7: - if (context.getSessionData(CK.Q_INITIAL_EVENT) == null) { - return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")"; - } else { - return ChatColor.GRAY + "(" + ChatColor.AQUA + (String) context.getSessionData(CK.Q_INITIAL_EVENT) - + ChatColor.RESET + ChatColor.GRAY + ")"; - } - case 8: if (plugin.getDependencies().getCitizens() != null) { if (context.getSessionData(CK.Q_GUIDISPLAY) == null) { return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")"; @@ -231,13 +219,13 @@ public class QuestMainPrompt extends QuestsEditorNumericPrompt { } else { return ChatColor.GRAY + "(" + Lang.get("notInstalled") + ")"; } + case 8: case 9: case 10: case 11: case 12: case 13: case 14: - case 15: return ""; default: return null; @@ -290,26 +278,24 @@ public class QuestMainPrompt extends QuestsEditorNumericPrompt { return new QuestMainPrompt(context); } case 7: - return new QuestInitialActionPrompt(context); - case 8: if (plugin.getDependencies().getCitizens() != null) { return new QuestGuiDisplayPrompt(context); } else { return new QuestMainPrompt(context); } - case 9: + case 8: return new RequirementsPrompt(context); - case 10: + case 9: return new PlannerPrompt(context); - case 11: + case 10: return new StageMenuPrompt(context); - case 12: + case 11: return new RewardsPrompt(context); - case 13: + case 12: return new OptionsPrompt(context); - case 14: + case 13: return new QuestSavePrompt(context); - case 15: + case 14: return new QuestExitPrompt(context); default: return new QuestMainPrompt(context); @@ -656,57 +642,6 @@ public class QuestMainPrompt extends QuestsEditorNumericPrompt { } } - public class QuestInitialActionPrompt extends QuestsEditorStringPrompt { - - public QuestInitialActionPrompt(final ConversationContext context) { - super(context); - } - - @Override - public String getTitle(final ConversationContext context) { - return Lang.get("eventTitle"); - } - - @Override - public String getQueryText(final ConversationContext context) { - return Lang.get("questEditorEnterInitialEvent"); - } - - @Override - public String getPromptText(final ConversationContext context) { - String text = ChatColor.AQUA + getTitle(context) + "\n"; - if (plugin.getActions().isEmpty()) { - text += ChatColor.RED + "- " + Lang.get("none"); - } else { - for (final Action e : plugin.getActions()) { - text += ChatColor.GREEN + "- " + e.getName() + "\n"; - } - } - return text + ChatColor.YELLOW + getQueryText(context); - } - - @Override - public Prompt acceptInput(final ConversationContext context, final String input) { - if (input.equalsIgnoreCase(Lang.get("cmdCancel")) == false - && input.equalsIgnoreCase(Lang.get("cmdClear")) == false) { - final Action a = plugin.getAction(input); - if (a != null) { - context.setSessionData(CK.Q_INITIAL_EVENT, a.getName()); - return new QuestMainPrompt(context); - } - context.getForWhom().sendRawMessage(ChatColor.RED + input + ChatColor.YELLOW + " " - + Lang.get("questEditorInvalidEventName")); - return new QuestInitialActionPrompt(context); - } else if (input.equalsIgnoreCase(Lang.get("cmdClear"))) { - context.setSessionData(CK.Q_INITIAL_EVENT, null); - context.getForWhom().sendRawMessage(ChatColor.YELLOW + Lang.get("questEditorEventCleared")); - return new QuestMainPrompt(context); - } else { - return new QuestMainPrompt(context); - } - } - } - public class QuestGuiDisplayPrompt extends QuestsEditorNumericPrompt { private final Quests plugin; diff --git a/main/src/main/resources/strings.yml b/main/src/main/resources/strings.yml index e59bfe76d..e475bf04c 100644 --- a/main/src/main/resources/strings.yml +++ b/main/src/main/resources/strings.yml @@ -58,7 +58,6 @@ questEditorAskMessage: "Set ask message" questEditorFinishMessage: "Set finish message" questEditorNPCStart: "Set NPC start" questEditorBlockStart: "Set block start" -questEditorInitialEvent: "Set initial action" questEditorSetGUI: "Set GUI item display" questEditorReqs: "Edit Requirements" questEditorPln: "Edit Planner" @@ -72,7 +71,6 @@ questEditorEnterAskMessage: "Enter ask message, " questEditorEnterFinishMessage: "Enter finish message, " questEditorEnterNPCStart: "Enter NPC ID, , " questEditorEnterBlockStart: "Right-click on a block to use as a start point, , , " -questEditorEnterInitialEvent: "Enter an action name, , " questDungeonsCreate: "Players added to this group may perform quests together!" questDungeonsDisband: "The quest group was disbanded." questDungeonsInvite: " can now perform quests with you!" @@ -96,7 +94,6 @@ questDeleted: "Quest deleted! Quest and action data has been reloaded." questEditorNameExists: "A quest with that name already exists!" questEditorBeingEdited: "Something with that name is already being modified!" questEditorInvalidQuestName: "Name may not contain periods or commas!" -questEditorInvalidEventName: "is not a valid action name!" questEditorInvalidNPC: "No NPC exists with that ID!" questEditorNoStartBlockSelected: "You must select a block first." questEditorPositiveAmount: "Amount must be a positive number." @@ -104,7 +101,6 @@ questEditorQuestAsRequirement1: "The following quests have" questEditorQuestAsRequirement2: "as a requirement:" questEditorQuestAsRequirement3: "You must modify these quests so that they do not use it before deleting it." questEditorQuestNotFound: "Quest not found!" -questEditorEventCleared: "Initial action cleared." questEditorSave: "Finish and save?" questEditorNeedAskMessage: "You must set an ask message!" questEditorNeedFinishMessage: "You must set a finish message!" @@ -618,7 +614,6 @@ phatLootsRewardsTitle: "- PhatLoots Rewards -" customRequirementsTitle: "- Custom Requirements -" customRewardsTitle: "- Custom Rewards -" skillListTitle: "- Skill List -" -eventTitle: "- Action -" topQuestersTitle: "- Top Questers -" createItemTitle: "- Create Item -" dateTimeTitle: "- Date & Time -"