mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-17 19:15:11 +00:00
Added getHookName() function
This commit is contained in:
1 parent
8ea98cba9b
commit
681f62eeb6
12 files changed
+383
-3
No files matched your search
@@ -5,6 +5,7 @@ import noppes.npcs.api.event.IQuestEvent;
|
||||
import noppes.npcs.api.handler.data.IQuest;
|
||||
import noppes.npcs.api.item.IItemStack;
|
||||
import noppes.npcs.api.entity.IPlayer;
|
||||
import noppes.npcs.constants.EnumScriptType;
|
||||
|
||||
public class QuestEvent extends CustomNPCsEvent implements IQuestEvent {
|
||||
public final IQuest quest;
|
||||
@@ -23,10 +24,18 @@ public class QuestEvent extends CustomNPCsEvent implements IQuestEvent {
|
||||
return quest;
|
||||
}
|
||||
|
||||
public String getHookName() {
|
||||
return EnumScriptType.QUEST_EVENT.function;
|
||||
}
|
||||
|
||||
public static class QuestCompletedEvent extends QuestEvent implements IQuestEvent.QuestCompletedEvent {
|
||||
public QuestCompletedEvent(IPlayer player, IQuest quest) {
|
||||
super(player, quest);
|
||||
}
|
||||
|
||||
public String getHookName() {
|
||||
return EnumScriptType.QUEST_COMPLETED.function;
|
||||
}
|
||||
}
|
||||
|
||||
@Cancelable
|
||||
@@ -34,6 +43,10 @@ public class QuestEvent extends CustomNPCsEvent implements IQuestEvent {
|
||||
public QuestStartEvent(IPlayer player, IQuest quest) {
|
||||
super(player, quest);
|
||||
}
|
||||
|
||||
public String getHookName() {
|
||||
return EnumScriptType.QUEST_START.function;
|
||||
}
|
||||
}
|
||||
|
||||
@Cancelable
|
||||
@@ -46,6 +59,10 @@ public class QuestEvent extends CustomNPCsEvent implements IQuestEvent {
|
||||
this.expReward = 0;
|
||||
}
|
||||
|
||||
public String getHookName() {
|
||||
return EnumScriptType.QUEST_TURNIN.function;
|
||||
}
|
||||
|
||||
public void setExpReward(int expReward) {
|
||||
this.expReward = expReward;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user