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,16 +256,19 @@ public class NpcListener implements Listener {
player.sendMessage(ChatColor.YELLOW + completed);
} else {
quester.setQuestToTake(q.getName());
String s = extracted(quester);
for (String msg : s.split("<br>")) {
player.sendMessage(msg);
}
if (!plugin.getSettings().canAskConfirmation()) {
quester.takeQuest(q, false);
} else {
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) {
String msg = Lang.get(player, "questMaxAllowed");
msg = msg.replace("<number>", String.valueOf(plugin.getSettings().getMaxQuests()));