Use durability with GUI items for pre-1.13, fixes #935

This commit is contained in:
PikaMug 2019-10-01 15:36:00 -04:00
parent 53ca286093
commit f26d81e30c
2 changed files with 5 additions and 2 deletions

View File

@ -1057,7 +1057,6 @@ public class QuestFactory implements ConversationAbandonedListener {
} }
if (cc.getSessionData(CK.Q_GUIDISPLAY) != null) { if (cc.getSessionData(CK.Q_GUIDISPLAY) != null) {
guiDisplay = (ItemStack) cc.getSessionData(CK.Q_GUIDISPLAY); guiDisplay = (ItemStack) cc.getSessionData(CK.Q_GUIDISPLAY);
guiDisplay = new ItemStack(guiDisplay.getType());
} }
if (cc.getSessionData(CK.REW_MONEY) != null) { if (cc.getSessionData(CK.REW_MONEY) != null) {
moneyRew = (Integer) cc.getSessionData(CK.REW_MONEY); moneyRew = (Integer) cc.getSessionData(CK.REW_MONEY);

View File

@ -202,7 +202,11 @@ public class NpcListener implements Listener {
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 {
plugin.getConversationFactory().buildConversation((Conversable) player).begin();
}
} }
} else if (quester.getCurrentQuests().containsKey(q) == false) { } else if (quester.getCurrentQuests().containsKey(q) == false) {
String msg = Lang.get(player, "questMaxAllowed"); String msg = Lang.get(player, "questMaxAllowed");