From fdc8be450d383b1788039dc58ef0d07e09d35cb0 Mon Sep 17 00:00:00 2001 From: PikaMug Date: Mon, 11 Nov 2019 15:11:57 -0500 Subject: [PATCH] Do show inventory menu if only one quest in GUI, fixes #996 --- .../me/blackvein/quests/listeners/NpcListener.java | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/main/src/main/java/me/blackvein/quests/listeners/NpcListener.java b/main/src/main/java/me/blackvein/quests/listeners/NpcListener.java index 730651c64..3cb171f7d 100644 --- a/main/src/main/java/me/blackvein/quests/listeners/NpcListener.java +++ b/main/src/main/java/me/blackvein/quests/listeners/NpcListener.java @@ -256,14 +256,17 @@ public class NpcListener implements Listener { player.sendMessage(ChatColor.YELLOW + completed); } else { quester.setQuestToTake(q.getName()); - String s = extracted(quester); - for (String msg : s.split("
")) { - player.sendMessage(msg); - } if (!plugin.getSettings().canAskConfirmation()) { quester.takeQuest(q, false); } else { - plugin.getConversationFactory().buildConversation((Conversable) player).begin(); + if (q.getGUIDisplay() != null) { + quester.showGUIDisplay(evt.getNPC(), npcQuests); + } else { + for (String msg : extracted(quester).split("
")) { + player.sendMessage(msg); + } + plugin.getConversationFactory().buildConversation((Conversable) player).begin(); + } } } } else if (quester.getCurrentQuests().containsKey(q) == false) {