Do show inventory menu if only one quest in GUI, fixes #996

This commit is contained in:
PikaMug 2019-11-11 15:11:57 -05:00
parent 6dc01de62c
commit fdc8be450d

View File

@ -256,14 +256,17 @@ public class NpcListener implements Listener {
player.sendMessage(ChatColor.YELLOW + completed); player.sendMessage(ChatColor.YELLOW + completed);
} else { } else {
quester.setQuestToTake(q.getName()); quester.setQuestToTake(q.getName());
String s = extracted(quester);
for (String msg : s.split("<br>")) {
player.sendMessage(msg);
}
if (!plugin.getSettings().canAskConfirmation()) { if (!plugin.getSettings().canAskConfirmation()) {
quester.takeQuest(q, false); quester.takeQuest(q, false);
} else { } else {
plugin.getConversationFactory().buildConversation((Conversable) player).begin(); if (q.getGUIDisplay() != null) {
quester.showGUIDisplay(evt.getNPC(), npcQuests);
} else {
for (String msg : extracted(quester).split("<br>")) {
player.sendMessage(msg);
}
plugin.getConversationFactory().buildConversation((Conversable) player).begin();
}
} }
} }
} else if (quester.getCurrentQuests().containsKey(q) == false) { } else if (quester.getCurrentQuests().containsKey(q) == false) {