From 4cca31384089b7138ec70ebb9c1d1162a817299d Mon Sep 17 00:00:00 2001 From: PikaMug Date: Fri, 24 Jan 2020 15:27:36 -0500 Subject: [PATCH] Add missing hook, see c7ed68e99f0f9ba955112ec2ee67779112e1f377 --- ...sEditorPostOpenRequirementsItemListPromptEvent.java | 10 +++++++++- .../blackvein/quests/prompts/RequirementsPrompt.java | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/main/src/main/java/me/blackvein/quests/events/editor/quests/QuestsEditorPostOpenRequirementsItemListPromptEvent.java b/main/src/main/java/me/blackvein/quests/events/editor/quests/QuestsEditorPostOpenRequirementsItemListPromptEvent.java index 0d4971a40..fb3a29088 100644 --- a/main/src/main/java/me/blackvein/quests/events/editor/quests/QuestsEditorPostOpenRequirementsItemListPromptEvent.java +++ b/main/src/main/java/me/blackvein/quests/events/editor/quests/QuestsEditorPostOpenRequirementsItemListPromptEvent.java @@ -15,12 +15,20 @@ package me.blackvein.quests.events.editor.quests; import org.bukkit.conversations.ConversationContext; import org.bukkit.event.HandlerList; +import me.blackvein.quests.QuestFactory; + public class QuestsEditorPostOpenRequirementsItemListPromptEvent extends QuestsEditorEvent { private static final HandlerList handlers = new HandlerList(); + private final QuestFactory factory; - public QuestsEditorPostOpenRequirementsItemListPromptEvent(ConversationContext context) { + public QuestsEditorPostOpenRequirementsItemListPromptEvent(QuestFactory factory, ConversationContext context) { super(context); this.context = context; + this.factory = factory; + } + + public QuestFactory getQuestFactory() { + return factory; } @Override diff --git a/main/src/main/java/me/blackvein/quests/prompts/RequirementsPrompt.java b/main/src/main/java/me/blackvein/quests/prompts/RequirementsPrompt.java index 0b967b01d..e7a848128 100644 --- a/main/src/main/java/me/blackvein/quests/prompts/RequirementsPrompt.java +++ b/main/src/main/java/me/blackvein/quests/prompts/RequirementsPrompt.java @@ -566,7 +566,7 @@ public class RequirementsPrompt extends NumericPrompt { @Override public String getPromptText(ConversationContext context) { QuestsEditorPostOpenRequirementsItemListPromptEvent event - = new QuestsEditorPostOpenRequirementsItemListPromptEvent(context); + = new QuestsEditorPostOpenRequirementsItemListPromptEvent(factory, context); plugin.getServer().getPluginManager().callEvent(event); // Check/add newly made item if (context.getSessionData("newItem") != null) {