Add missing hook, see c7ed68e99f

This commit is contained in:
PikaMug 2020-01-24 15:27:36 -05:00
parent c158661eb5
commit 4cca313840
2 changed files with 10 additions and 2 deletions

View File

@ -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

View File

@ -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) {