mirror of
https://github.com/PikaMug/Quests.git
synced 2024-12-01 07:03:55 +01:00
Use durability with GUI items for pre-1.13, fixes #935
This commit is contained in:
parent
53ca286093
commit
f26d81e30c
@ -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);
|
||||||
|
@ -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");
|
||||||
|
Loading…
Reference in New Issue
Block a user