Revise a few Quest Editor prompt names and events

This commit is contained in:
PikaMug 2019-11-15 00:04:38 -05:00
parent 524f48d3fb
commit a5578e3e59
4 changed files with 95 additions and 95 deletions

View File

@ -47,9 +47,9 @@ import org.bukkit.inventory.ItemStack;
import com.sk89q.worldguard.protection.managers.RegionManager;
import me.blackvein.quests.actions.Action;
import me.blackvein.quests.events.editor.quests.QuestsEditorPostOpenCreatePromptEvent;
import me.blackvein.quests.events.editor.quests.QuestsEditorPostOpenExitPromptEvent;
import me.blackvein.quests.events.editor.quests.QuestsEditorPostOpenMainPromptEvent;
import me.blackvein.quests.events.editor.quests.QuestsEditorPostOpenExitPromptEvent;
import me.blackvein.quests.events.editor.quests.QuestsEditorPostOpenMenuPromptEvent;
import me.blackvein.quests.events.editor.quests.QuestsEditorPostOpenSavePromptEvent;
import me.blackvein.quests.events.editor.quests.QuestsEditorPostOpenSelectCreatePromptEvent;
import me.blackvein.quests.prompts.GUIDisplayPrompt;
@ -82,7 +82,7 @@ public class QuestFactory implements ConversationAbandonedListener {
questsFile = new File(plugin.getDataFolder(), "quests.yml");
// Ensure to initialize convoCreator last so that 'this' is fully initialized before it is passed
this.convoCreator = new ConversationFactory(plugin).withModality(false).withLocalEcho(false)
.withFirstPrompt(new MainMenuPrompt()).withTimeout(3600)
.withFirstPrompt(new QuestMenuPrompt()).withTimeout(3600)
.thatExcludesNonPlayersWithMessage("Console may not perform this operation!")
.addConversationAbandonedListener(this);
}
@ -142,7 +142,7 @@ public class QuestFactory implements ConversationAbandonedListener {
selectedReachLocations.remove(player.getUniqueId());
}
public class MainMenuPrompt extends NumericPrompt {
public class QuestMenuPrompt extends NumericPrompt {
private final int size = 4;
public int getSize() {
@ -183,7 +183,7 @@ public class QuestFactory implements ConversationAbandonedListener {
@Override
public String getPromptText(ConversationContext context) {
QuestsEditorPostOpenMainPromptEvent event = new QuestsEditorPostOpenMainPromptEvent(context);
QuestsEditorPostOpenMenuPromptEvent event = new QuestsEditorPostOpenMenuPromptEvent(context);
plugin.getServer().getPluginManager().callEvent(event);
String text = ChatColor.GOLD + getTitle() + "\n";
for (int i = 1; i <= size; i++) {
@ -202,21 +202,21 @@ public class QuestFactory implements ConversationAbandonedListener {
return new QuestSelectCreatePrompt();
} else {
player.sendMessage(ChatColor.RED + Lang.get("noPermission"));
return new MainMenuPrompt();
return new QuestMenuPrompt();
}
case 2:
if (player.hasPermission("quests.editor.*") || player.hasPermission("quests.editor.edit")) {
return new QuestSelectEditPrompt();
} else {
player.sendMessage(ChatColor.RED + Lang.get("noPermission"));
return new MainMenuPrompt();
return new QuestMenuPrompt();
}
case 3:
if (player.hasPermission("quests.editor.*") || player.hasPermission("quests.editor.delete")) {
return new QuestSelectDeletePrompt();
} else {
player.sendMessage(ChatColor.RED + Lang.get("noPermission"));
return new MainMenuPrompt();
return new QuestMenuPrompt();
}
case 4:
context.getForWhom().sendRawMessage(ChatColor.YELLOW + Lang.get("exited"));
@ -228,10 +228,10 @@ public class QuestFactory implements ConversationAbandonedListener {
}
public Prompt returnToMenu() {
return new CreateMenuPrompt();
return new QuestMainPrompt();
}
public class CreateMenuPrompt extends NumericPrompt {
public class QuestMainPrompt extends NumericPrompt {
private final int size = 15;
public int getSize() {
@ -426,7 +426,7 @@ public class QuestFactory implements ConversationAbandonedListener {
@Override
public String getPromptText(ConversationContext context) {
QuestsEditorPostOpenCreatePromptEvent event = new QuestsEditorPostOpenCreatePromptEvent(context);
QuestsEditorPostOpenMainPromptEvent event = new QuestsEditorPostOpenMainPromptEvent(context);
plugin.getServer().getPluginManager().callEvent(event);
String text = ChatColor.GOLD + "- " + getTitle(context).replaceFirst(": ", ": " + ChatColor.AQUA)
@ -451,7 +451,7 @@ public class QuestFactory implements ConversationAbandonedListener {
if (plugin.getDependencies().getCitizens() != null) {
return new NPCStartPrompt();
} else {
return new CreateMenuPrompt();
return new QuestMainPrompt();
}
case 5:
selectedBlockStarts.put(((Player) context.getForWhom()).getUniqueId(), null);
@ -460,7 +460,7 @@ public class QuestFactory implements ConversationAbandonedListener {
if (plugin.getDependencies().getWorldGuardApi() != null) {
return new RegionPrompt();
} else {
return new CreateMenuPrompt();
return new QuestMainPrompt();
}
case 7:
return new InitialActionPrompt();
@ -468,7 +468,7 @@ public class QuestFactory implements ConversationAbandonedListener {
if (plugin.getDependencies().getCitizens() != null) {
return new GUIDisplayPrompt(plugin, QuestFactory.this);
} else {
return new CreateMenuPrompt();
return new QuestMainPrompt();
}
case 9:
return new RequirementsPrompt(plugin, QuestFactory.this);
@ -529,9 +529,9 @@ public class QuestFactory implements ConversationAbandonedListener {
}
context.setSessionData(CK.Q_NAME, input);
names.add(input);
return new CreateMenuPrompt();
return new QuestMainPrompt();
} else {
return new MainMenuPrompt();
return new QuestMenuPrompt();
}
}
}
@ -553,11 +553,11 @@ public class QuestFactory implements ConversationAbandonedListener {
Quest q = plugin.getQuest(input);
if (q != null) {
loadQuest(context, q);
return new CreateMenuPrompt();
return new QuestMainPrompt();
}
return new QuestSelectEditPrompt();
} else {
return new MainMenuPrompt();
return new QuestMenuPrompt();
}
}
}
@ -982,7 +982,7 @@ public class QuestFactory implements ConversationAbandonedListener {
((Player) context.getForWhom()).sendMessage(ChatColor.RED + Lang.get("questEditorQuestNotFound"));
return new QuestSelectDeletePrompt();
} else {
return new MainMenuPrompt();
return new QuestMenuPrompt();
}
}
}
@ -1005,7 +1005,7 @@ public class QuestFactory implements ConversationAbandonedListener {
deleteQuest(context);
return Prompt.END_OF_CONVERSATION;
} else if (input.equalsIgnoreCase("2") || input.equalsIgnoreCase(Lang.get("noWord"))) {
return new MainMenuPrompt();
return new QuestMenuPrompt();
} else {
return new QuestConfirmDeletePrompt();
}
@ -1077,7 +1077,7 @@ public class QuestFactory implements ConversationAbandonedListener {
context.setSessionData(CK.Q_NAME, input);
names.add(input);
}
return new CreateMenuPrompt();
return new QuestMainPrompt();
}
}
@ -1095,12 +1095,12 @@ public class QuestFactory implements ConversationAbandonedListener {
if (context.getSessionData(CK.Q_ASK_MESSAGE) != null) {
context.setSessionData(CK.Q_ASK_MESSAGE, context.getSessionData(CK.Q_ASK_MESSAGE) + " "
+ input.substring(2));
return new CreateMenuPrompt();
return new QuestMainPrompt();
}
}
context.setSessionData(CK.Q_ASK_MESSAGE, input);
}
return new CreateMenuPrompt();
return new QuestMainPrompt();
}
}
@ -1118,12 +1118,12 @@ public class QuestFactory implements ConversationAbandonedListener {
if (context.getSessionData(CK.Q_FINISH_MESSAGE) != null) {
context.setSessionData(CK.Q_FINISH_MESSAGE, context.getSessionData(CK.Q_FINISH_MESSAGE) + " "
+ input.substring(2));
return new CreateMenuPrompt();
return new QuestMainPrompt();
}
}
context.setSessionData(CK.Q_FINISH_MESSAGE, input);
}
return new CreateMenuPrompt();
return new QuestMainPrompt();
}
}
@ -1149,7 +1149,7 @@ public class QuestFactory implements ConversationAbandonedListener {
}
context.setSessionData(CK.Q_START_NPC, i);
selectingNpcs.remove((Player) context.getForWhom());
return new CreateMenuPrompt();
return new QuestMainPrompt();
}
} catch (NumberFormatException e) {
context.getForWhom().sendRawMessage(ChatColor.RED
@ -1160,7 +1160,7 @@ public class QuestFactory implements ConversationAbandonedListener {
context.setSessionData(CK.Q_START_NPC, null);
}
selectingNpcs.remove((Player) context.getForWhom());
return new CreateMenuPrompt();
return new QuestMainPrompt();
}
}
@ -1188,11 +1188,11 @@ public class QuestFactory implements ConversationAbandonedListener {
} else {
selectedBlockStarts.remove(player.getUniqueId());
}
return new CreateMenuPrompt();
return new QuestMainPrompt();
} else if (input.equalsIgnoreCase(Lang.get("cmdClear"))) {
selectedBlockStarts.remove(player.getUniqueId());
context.setSessionData(CK.Q_START_BLOCK, null);
return new CreateMenuPrompt();
return new QuestMainPrompt();
}
return new BlockStartPrompt();
}
@ -1249,14 +1249,14 @@ public class QuestFactory implements ConversationAbandonedListener {
return new RegionPrompt();
} else {
context.setSessionData(CK.Q_REGION, found);
return new CreateMenuPrompt();
return new QuestMainPrompt();
}
} else if (input.equalsIgnoreCase(Lang.get("cmdClear"))) {
context.setSessionData(CK.Q_REGION, null);
player.sendMessage(ChatColor.YELLOW + Lang.get("questWGRegionCleared"));
return new CreateMenuPrompt();
return new QuestMainPrompt();
} else {
return new CreateMenuPrompt();
return new QuestMainPrompt();
}
}
}
@ -1284,7 +1284,7 @@ public class QuestFactory implements ConversationAbandonedListener {
Action a = plugin.getAction(input);
if (a != null) {
context.setSessionData(CK.Q_INITIAL_EVENT, a.getName());
return new CreateMenuPrompt();
return new QuestMainPrompt();
}
player.sendMessage(ChatColor.RED + input + ChatColor.YELLOW + " "
+ Lang.get("questEditorInvalidEventName"));
@ -1292,9 +1292,9 @@ public class QuestFactory implements ConversationAbandonedListener {
} else if (input.equalsIgnoreCase(Lang.get("cmdClear"))) {
context.setSessionData(CK.Q_INITIAL_EVENT, null);
player.sendMessage(ChatColor.YELLOW + Lang.get("questEditorEventCleared"));
return new CreateMenuPrompt();
return new QuestMainPrompt();
} else {
return new CreateMenuPrompt();
return new QuestMainPrompt();
}
}
}
@ -1352,13 +1352,13 @@ public class QuestFactory implements ConversationAbandonedListener {
if (input.equalsIgnoreCase("1") || input.equalsIgnoreCase(Lang.get("yesWord"))) {
if (context.getSessionData(CK.Q_ASK_MESSAGE) == null) {
context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("questEditorNeedAskMessage"));
return new CreateMenuPrompt();
return new QuestMainPrompt();
} else if (context.getSessionData(CK.Q_FINISH_MESSAGE) == null) {
context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("questEditorNeedFinishMessage"));
return new CreateMenuPrompt();
return new QuestMainPrompt();
} else if (new StagesPrompt(plugin, QuestFactory.this).getStages(context) == 0) {
context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("questEditorNeedStages"));
return new CreateMenuPrompt();
return new QuestMainPrompt();
}
FileConfiguration data = new YamlConfiguration();
try {
@ -1388,7 +1388,7 @@ public class QuestFactory implements ConversationAbandonedListener {
}
return Prompt.END_OF_CONVERSATION;
} else if (input.equalsIgnoreCase("2") || input.equalsIgnoreCase(Lang.get("noWord"))) {
return new CreateMenuPrompt();
return new QuestMainPrompt();
} else {
return new SavePrompt();
}
@ -1448,7 +1448,7 @@ public class QuestFactory implements ConversationAbandonedListener {
context.getForWhom().sendRawMessage(ChatColor.BOLD + "" + ChatColor.YELLOW + Lang.get("exited"));
return Prompt.END_OF_CONVERSATION;
} else if (input.equalsIgnoreCase("2") || input.equalsIgnoreCase(Lang.get("noWord"))) {
return new CreateMenuPrompt();
return new QuestMainPrompt();
} else {
return new ExitPrompt();
}

View File

@ -51,7 +51,7 @@ import me.blackvein.quests.QuestMob;
import me.blackvein.quests.Quester;
import me.blackvein.quests.Quests;
import me.blackvein.quests.Stage;
import me.blackvein.quests.events.editor.actions.ActionsEditorPostOpenCreatePromptEvent;
import me.blackvein.quests.events.editor.actions.ActionsEditorPostOpenMainPromptEvent;
import me.blackvein.quests.events.editor.actions.ActionsEditorPostOpenMenuPromptEvent;
import me.blackvein.quests.prompts.ItemStackPrompt;
import me.blackvein.quests.util.CK;
@ -78,7 +78,7 @@ public class ActionFactory implements ConversationAbandonedListener {
actionsFile = new File(plugin.getDataFolder(), "actions.yml");
// Ensure to initialize convoCreator last so that 'this' is fully initialized before it is passed
this.convoCreator = new ConversationFactory(plugin).withModality(false).withLocalEcho(false)
.withPrefix(new QuestCreatorPrefix()).withFirstPrompt(new MenuPrompt()).withTimeout(3600)
.withPrefix(new QuestCreatorPrefix()).withFirstPrompt(new ActionMenuPrompt()).withTimeout(3600)
.thatExcludesNonPlayersWithMessage("Console may not perform this operation!")
.addConversationAbandonedListener(this);
}
@ -148,7 +148,7 @@ public class ActionFactory implements ConversationAbandonedListener {
}
}
public class MenuPrompt extends NumericPrompt {
public class ActionMenuPrompt extends NumericPrompt {
private final int size = 4;
public int getSize() {
@ -210,7 +210,7 @@ public class ActionFactory implements ConversationAbandonedListener {
return new ActionSelectCreatePrompt();
} else {
player.sendMessage(ChatColor.RED + Lang.get("noPermission"));
return new MenuPrompt();
return new ActionMenuPrompt();
}
case 2:
if (player.hasPermission("quests.editor.actions.edit")
@ -218,13 +218,13 @@ public class ActionFactory implements ConversationAbandonedListener {
if (plugin.getActions().isEmpty()) {
((Player) context.getForWhom()).sendMessage(ChatColor.YELLOW
+ Lang.get("eventEditorNoneToEdit"));
return new MenuPrompt();
return new ActionMenuPrompt();
} else {
return new ActionSelectEditPrompt();
}
} else {
player.sendMessage(ChatColor.RED + Lang.get("noPermission"));
return new MenuPrompt();
return new ActionMenuPrompt();
}
case 3:
if (player.hasPermission("quests.editor.actions.delete")
@ -232,13 +232,13 @@ public class ActionFactory implements ConversationAbandonedListener {
if (plugin.getActions().isEmpty()) {
((Player) context.getForWhom()).sendMessage(ChatColor.YELLOW
+ Lang.get("eventEditorNoneToDelete"));
return new MenuPrompt();
return new ActionMenuPrompt();
} else {
return new ActionSelectDeletePrompt();
}
} else {
player.sendMessage(ChatColor.RED + Lang.get("noPermission"));
return new MenuPrompt();
return new ActionMenuPrompt();
}
case 4:
((Player) context.getForWhom()).sendMessage(ChatColor.YELLOW + Lang.get("exited"));
@ -250,10 +250,10 @@ public class ActionFactory implements ConversationAbandonedListener {
}
public Prompt returnToMenu() {
return new CreateMenuPrompt();
return new ActionMainPrompt();
}
public class CreateMenuPrompt extends NumericPrompt {
public class ActionMainPrompt extends NumericPrompt {
private final int size = 9;
public int getSize() {
@ -347,7 +347,7 @@ public class ActionFactory implements ConversationAbandonedListener {
@Override
public String getPromptText(ConversationContext context) {
ActionsEditorPostOpenCreatePromptEvent event = new ActionsEditorPostOpenCreatePromptEvent(context);
ActionsEditorPostOpenMainPromptEvent event = new ActionsEditorPostOpenMainPromptEvent(context);
plugin.getServer().getPluginManager().callEvent(event);
String text = ChatColor.GOLD + "- " + getTitle(context).replaceFirst(": ", ": " + ChatColor.AQUA)
@ -381,7 +381,7 @@ public class ActionFactory implements ConversationAbandonedListener {
} else {
context.setSessionData(CK.E_FAIL_QUEST, Lang.get("yesWord"));
}
return new CreateMenuPrompt();
return new ActionMainPrompt();
case 8:
if (context.getSessionData(CK.E_OLD_EVENT) != null) {
return new SavePrompt((String) context.getSessionData(CK.E_OLD_EVENT));
@ -424,9 +424,9 @@ public class ActionFactory implements ConversationAbandonedListener {
}
context.setSessionData(CK.E_NAME, input);
names.add(input);
return new CreateMenuPrompt();
return new ActionMainPrompt();
} else {
return new MenuPrompt();
return new ActionMenuPrompt();
}
}
}
@ -452,12 +452,12 @@ public class ActionFactory implements ConversationAbandonedListener {
context.setSessionData(CK.E_OLD_EVENT, a.getName());
context.setSessionData(CK.E_NAME, a.getName());
loadData(a, context);
return new CreateMenuPrompt();
return new ActionMainPrompt();
}
((Player) context.getForWhom()).sendMessage(ChatColor.RED + Lang.get("eventEditorNotFound"));
return new ActionSelectEditPrompt();
} else {
return new MenuPrompt();
return new ActionMenuPrompt();
}
}
}
@ -601,7 +601,7 @@ public class ActionFactory implements ConversationAbandonedListener {
((Player) context.getForWhom()).sendMessage(ChatColor.RED + Lang.get("eventEditorNotFound"));
return new ActionSelectDeletePrompt();
} else {
return new MenuPrompt();
return new ActionMenuPrompt();
}
}
}
@ -622,9 +622,9 @@ public class ActionFactory implements ConversationAbandonedListener {
public Prompt acceptInput(ConversationContext context, String input) {
if (input.equalsIgnoreCase("1") || input.equalsIgnoreCase(Lang.get("yesWord"))) {
deleteAction(context);
return new MenuPrompt();
return new ActionMenuPrompt();
} else if (input.equalsIgnoreCase("2") || input.equalsIgnoreCase(Lang.get("noWord"))) {
return new MenuPrompt();
return new ActionMenuPrompt();
} else {
return new ActionConfirmDeletePrompt();
}
@ -743,7 +743,7 @@ public class ActionFactory implements ConversationAbandonedListener {
} else {
context.setSessionData(CK.E_CLEAR_INVENTORY, Lang.get("yesWord"));
}
return new CreateMenuPrompt();
return new ActionMainPrompt();
} else if (input.equalsIgnoreCase("3")) {
return new ItemListPrompt();
} else if (input.equalsIgnoreCase("4")) {
@ -760,7 +760,7 @@ public class ActionFactory implements ConversationAbandonedListener {
} else if (input.equalsIgnoreCase("9")) {
return new CommandsPrompt();
}
return new CreateMenuPrompt();
return new ActionMainPrompt();
}
}
@ -803,9 +803,9 @@ public class ActionFactory implements ConversationAbandonedListener {
} else {
context.setSessionData(CK.E_CANCEL_TIMER, Lang.get("yesWord"));
}
return new CreateMenuPrompt();
return new ActionMainPrompt();
}
return new CreateMenuPrompt();
return new ActionMainPrompt();
}
}
@ -856,7 +856,7 @@ public class ActionFactory implements ConversationAbandonedListener {
selectedExplosionLocations.put(((Player) context.getForWhom()).getUniqueId(), null);
return new ExplosionPrompt();
}
return new CreateMenuPrompt();
return new ActionMainPrompt();
}
}
@ -917,7 +917,7 @@ public class ActionFactory implements ConversationAbandonedListener {
selectedLightningLocations.put(((Player) context.getForWhom()).getUniqueId(), null);
return new LightningPrompt();
}
return new CreateMenuPrompt();
return new ActionMainPrompt();
}
}
@ -926,7 +926,7 @@ public class ActionFactory implements ConversationAbandonedListener {
@Override
protected Prompt acceptValidatedInput(final ConversationContext context, final Number number) {
context.setSessionData(CK.E_TIMER, number);
return new CreateMenuPrompt();
return new ActionMainPrompt();
}
@Override
@ -974,9 +974,9 @@ public class ActionFactory implements ConversationAbandonedListener {
public Prompt acceptInput(ConversationContext context, String input) {
if (input.equalsIgnoreCase("1") || input.equalsIgnoreCase(Lang.get("yesWord"))) {
saveAction(context);
return new MenuPrompt();
return new ActionMenuPrompt();
} else if (input.equalsIgnoreCase("2") || input.equalsIgnoreCase(Lang.get("noWord"))) {
return new CreateMenuPrompt();
return new ActionMainPrompt();
} else {
return new SavePrompt(modName);
}
@ -1000,7 +1000,7 @@ public class ActionFactory implements ConversationAbandonedListener {
clearData(context);
return Prompt.END_OF_CONVERSATION;
} else if (input.equalsIgnoreCase("2") || input.equalsIgnoreCase(Lang.get("noWord"))) {
return new CreateMenuPrompt();
return new ActionMainPrompt();
} else {
return new ExitPrompt();
}
@ -1297,14 +1297,14 @@ public class ActionFactory implements ConversationAbandonedListener {
player.sendMessage(ChatColor.RED + Lang.get("eventEditorSelectBlockFirst"));
return new ExplosionPrompt();
}
return new CreateMenuPrompt();
return new ActionMainPrompt();
} else if (input.equalsIgnoreCase(Lang.get("cmdClear"))) {
context.setSessionData(CK.E_EXPLOSIONS, null);
selectedExplosionLocations.remove(player.getUniqueId());
return new CreateMenuPrompt();
return new ActionMainPrompt();
} else if (input.equalsIgnoreCase(Lang.get("cmdCancel"))) {
selectedExplosionLocations.remove(player.getUniqueId());
return new CreateMenuPrompt();
return new ActionMainPrompt();
} else {
return new ExplosionPrompt();
}
@ -1339,7 +1339,7 @@ public class ActionFactory implements ConversationAbandonedListener {
context.setSessionData(CK.E_NAME, input);
names.add(input);
}
return new CreateMenuPrompt();
return new ActionMainPrompt();
}
}
@ -1358,7 +1358,7 @@ public class ActionFactory implements ConversationAbandonedListener {
} else if (input.equalsIgnoreCase(Lang.get("cmdClear"))) {
context.setSessionData(CK.E_MESSAGE, null);
}
return new CreateMenuPrompt();
return new ActionMainPrompt();
}
}
@ -1415,7 +1415,7 @@ public class ActionFactory implements ConversationAbandonedListener {
context.setSessionData(CK.E_ITEMS, null);
return new ItemListPrompt();
} else if (input.equalsIgnoreCase("3")) {
return new CreateMenuPrompt();
return new ActionMainPrompt();
}
return null;
}
@ -1499,7 +1499,7 @@ public class ActionFactory implements ConversationAbandonedListener {
two = 0;
}
if (one == two) {
return new CreateMenuPrompt();
return new ActionMainPrompt();
} else {
context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("listsNotSameSize"));
return new SoundEffectListPrompt();
@ -1664,7 +1664,7 @@ public class ActionFactory implements ConversationAbandonedListener {
context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("eventEditorMustSetStormDuration"));
return new StormPrompt();
} else {
return new CreateMenuPrompt();
return new ActionMainPrompt();
}
}
return null;
@ -1780,7 +1780,7 @@ public class ActionFactory implements ConversationAbandonedListener {
context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("eventEditorMustSetThunderDuration"));
return new ThunderPrompt();
} else {
return new CreateMenuPrompt();
return new ActionMainPrompt();
}
}
return null;
@ -1878,7 +1878,7 @@ public class ActionFactory implements ConversationAbandonedListener {
context.setSessionData(CK.E_MOB_TYPES, null);
return new MobPrompt();
} else if (input.equalsIgnoreCase("3")) {
return new CreateMenuPrompt();
return new ActionMainPrompt();
}
} else {
@SuppressWarnings("unchecked")
@ -1898,7 +1898,7 @@ public class ActionFactory implements ConversationAbandonedListener {
context.setSessionData(CK.E_MOB_TYPES, null);
return new MobPrompt();
} else if (inp == types.size() + 3) {
return new CreateMenuPrompt();
return new ActionMainPrompt();
} else if (inp > types.size()) {
return new MobPrompt();
} else {
@ -2289,14 +2289,14 @@ public class ActionFactory implements ConversationAbandonedListener {
player.sendMessage(ChatColor.RED + Lang.get("eventEditorSelectBlockFirst"));
return new LightningPrompt();
}
return new CreateMenuPrompt();
return new ActionMainPrompt();
} else if (input.equalsIgnoreCase(Lang.get("cmdClear"))) {
context.setSessionData(CK.E_LIGHTNING, null);
selectedLightningLocations.remove(player.getUniqueId());
return new CreateMenuPrompt();
return new ActionMainPrompt();
} else if (input.equalsIgnoreCase(Lang.get("cmdCancel"))) {
selectedLightningLocations.remove(player.getUniqueId());
return new CreateMenuPrompt();
return new ActionMainPrompt();
} else {
return new LightningPrompt();
}
@ -2410,7 +2410,7 @@ public class ActionFactory implements ConversationAbandonedListener {
three = 0;
}
if (one == two && two == three) {
return new CreateMenuPrompt();
return new ActionMainPrompt();
} else {
context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("eventEditorListSizeMismatch"));
return new PotionEffectPrompt();
@ -2541,7 +2541,7 @@ public class ActionFactory implements ConversationAbandonedListener {
} else {
context.setSessionData(CK.E_HUNGER, null);
}
return new CreateMenuPrompt();
return new ActionMainPrompt();
}
}
@ -2572,7 +2572,7 @@ public class ActionFactory implements ConversationAbandonedListener {
} else {
context.setSessionData(CK.E_SATURATION, null);
}
return new CreateMenuPrompt();
return new ActionMainPrompt();
}
}
@ -2603,7 +2603,7 @@ public class ActionFactory implements ConversationAbandonedListener {
} else {
context.setSessionData(CK.E_HEALTH, null);
}
return new CreateMenuPrompt();
return new ActionMainPrompt();
}
}
@ -2627,14 +2627,14 @@ public class ActionFactory implements ConversationAbandonedListener {
player.sendMessage(ChatColor.RED + Lang.get("eventEditorSelectBlockFirst"));
return new TeleportPrompt();
}
return new CreateMenuPrompt();
return new ActionMainPrompt();
} else if (input.equalsIgnoreCase(Lang.get("cmdClear"))) {
context.setSessionData(CK.E_TELEPORT, null);
selectedTeleportLocations.remove(player.getUniqueId());
return new CreateMenuPrompt();
return new ActionMainPrompt();
} else if (input.equalsIgnoreCase(Lang.get("cmdCancel"))) {
selectedTeleportLocations.remove(player.getUniqueId());
return new CreateMenuPrompt();
return new ActionMainPrompt();
} else {
return new TeleportPrompt();
}
@ -2660,7 +2660,7 @@ public class ActionFactory implements ConversationAbandonedListener {
} else if (input.equalsIgnoreCase(Lang.get("cmdClear"))) {
context.setSessionData(CK.E_COMMANDS, null);
}
return new CreateMenuPrompt();
return new ActionMainPrompt();
}
}

View File

@ -3,10 +3,10 @@ package me.blackvein.quests.events.editor.actions;
import org.bukkit.conversations.ConversationContext;
import org.bukkit.event.HandlerList;
public class ActionsEditorPostOpenCreatePromptEvent extends ActionsEditorEvent {
public class ActionsEditorPostOpenMainPromptEvent extends ActionsEditorEvent {
private static final HandlerList handlers = new HandlerList();
public ActionsEditorPostOpenCreatePromptEvent(ConversationContext context) {
public ActionsEditorPostOpenMainPromptEvent(ConversationContext context) {
super(context);
this.context = context;
}

View File

@ -3,10 +3,10 @@ package me.blackvein.quests.events.editor.quests;
import org.bukkit.conversations.ConversationContext;
import org.bukkit.event.HandlerList;
public class QuestsEditorPostOpenCreatePromptEvent extends QuestsEditorEvent {
public class QuestsEditorPostOpenMenuPromptEvent extends QuestsEditorEvent {
private static final HandlerList handlers = new HandlerList();
public QuestsEditorPostOpenCreatePromptEvent(ConversationContext context) {
public QuestsEditorPostOpenMenuPromptEvent(ConversationContext context) {
super(context);
this.context = context;
}