Close editor NPC selection if talk objective is aborted, fixes #1668

This commit is contained in:
PikaMug 2021-04-07 00:37:15 -04:00
parent 98d0076a2c
commit f63ef8aca7

View File

@ -511,13 +511,15 @@ public class NpcsPrompt extends QuestsEditorNumericPrompt {
return new NpcsIdsToTalkToPrompt(context);
}
}
final Set<UUID> temp = plugin.getQuestFactory().getSelectingNpcs();
temp.remove(((Player) context.getForWhom()).getUniqueId());
plugin.getQuestFactory().setSelectingNpcs(temp);
context.setSessionData(pref + CK.S_NPCS_TO_TALK_TO, npcs);
} else if (input.equalsIgnoreCase(Lang.get("cmdClear"))) {
context.setSessionData(pref + CK.S_NPCS_TO_TALK_TO, null);
}
if (context.getForWhom() instanceof Player) {
final Set<UUID> temp = plugin.getQuestFactory().getSelectingNpcs();
temp.remove(((Player) context.getForWhom()).getUniqueId());
plugin.getQuestFactory().setSelectingNpcs(temp);
}
return new StageMainPrompt(stageNum, context);
}
}