Do not reopen action/condition editor after saving

This commit is contained in:
PikaMug 2020-08-23 23:58:28 -04:00
parent 73aad3ac5c
commit d8c48a5f5a
2 changed files with 2 additions and 4 deletions

View File

@ -33,7 +33,6 @@ import me.blackvein.quests.Stage;
import me.blackvein.quests.actions.Action;
import me.blackvein.quests.convo.actions.ActionsEditorNumericPrompt;
import me.blackvein.quests.convo.actions.ActionsEditorStringPrompt;
import me.blackvein.quests.convo.actions.menu.ActionMenuPrompt;
import me.blackvein.quests.convo.actions.tasks.EffectPrompt;
import me.blackvein.quests.convo.actions.tasks.PlayerPrompt;
import me.blackvein.quests.convo.actions.tasks.TimerPrompt;
@ -993,7 +992,7 @@ public class ActionMainPrompt extends ActionsEditorNumericPrompt {
public Prompt acceptInput(final ConversationContext context, final String input) {
if (input.equalsIgnoreCase("1") || input.equalsIgnoreCase(Lang.get("yesWord"))) {
plugin.getActionFactory().saveAction(context);
return new ActionMenuPrompt(context);
return Prompt.END_OF_CONVERSATION;
} else if (input.equalsIgnoreCase("2") || input.equalsIgnoreCase(Lang.get("noWord"))) {
return new ActionMainPrompt(context);
} else {

View File

@ -25,7 +25,6 @@ import me.blackvein.quests.Quests;
import me.blackvein.quests.Stage;
import me.blackvein.quests.conditions.Condition;
import me.blackvein.quests.convo.conditions.ConditionsEditorNumericPrompt;
import me.blackvein.quests.convo.conditions.menu.ConditionMenuPrompt;
import me.blackvein.quests.convo.conditions.tasks.PlayerPrompt;
import me.blackvein.quests.convo.conditions.tasks.WorldPrompt;
import me.blackvein.quests.events.editor.conditions.ConditionsEditorPostOpenNumericPromptEvent;
@ -227,7 +226,7 @@ public class ConditionMainPrompt extends ConditionsEditorNumericPrompt {
public Prompt acceptInput(final ConversationContext context, final String input) {
if (input.equalsIgnoreCase("1") || input.equalsIgnoreCase(Lang.get("yesWord"))) {
plugin.getConditionFactory().saveCondition(context);
return new ConditionMenuPrompt(context);
return Prompt.END_OF_CONVERSATION;
} else if (input.equalsIgnoreCase("2") || input.equalsIgnoreCase(Lang.get("noWord"))) {
return new ConditionMainPrompt(context);
} else {