Package noppes.npcs.api.handler
Interface IPlayerQuestData
-
public interface IPlayerQuestDataTracks a player's quest progress, including active, finished, and tracked quests.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidfinishQuest(int id)Marks the quest with the given ID as finished.IQuest[]getActiveQuests()IQuest[]getFinishedQuests()longgetLastCompletedTime(int id)Returns the timestamp when the quest was last completed.IQuestgetTrackedQuest()booleanhasActiveQuest(int id)booleanhasFinishedQuest(int id)voidremoveQuest(int id)Removes the quest from both active and finished lists.voidsetLastCompletedTime(int id, long time)Sets the last completed time for the quest.voidstartQuest(int id)Starts the quest with the given ID for the player.voidstopQuest(int id)Removes the quest from the player's active quest list.
-
-
-
Method Detail
-
getTrackedQuest
IQuest getTrackedQuest()
- Returns:
- the quest currently being tracked by the player, or null if none.
-
startQuest
void startQuest(int id)
Starts the quest with the given ID for the player.- Parameters:
id- the quest ID.
-
finishQuest
void finishQuest(int id)
Marks the quest with the given ID as finished.- Parameters:
id- the quest ID.
-
stopQuest
void stopQuest(int id)
Removes the quest from the player's active quest list.- Parameters:
id- the quest ID.
-
removeQuest
void removeQuest(int id)
Removes the quest from both active and finished lists.- Parameters:
id- the quest ID.
-
hasFinishedQuest
boolean hasFinishedQuest(int id)
- Parameters:
id- the quest ID.- Returns:
- true if the player has finished the quest.
-
hasActiveQuest
boolean hasActiveQuest(int id)
- Parameters:
id- the quest ID.- Returns:
- true if the player has the quest active.
-
getActiveQuests
IQuest[] getActiveQuests()
- Returns:
- all active quests for the player.
-
getFinishedQuests
IQuest[] getFinishedQuests()
- Returns:
- all finished quests for the player.
-
getLastCompletedTime
long getLastCompletedTime(int id)
Returns the timestamp when the quest was last completed.- Parameters:
id- the quest ID.- Returns:
- the completion time, or 0 if never completed.
-
setLastCompletedTime
void setLastCompletedTime(int id, long time)Sets the last completed time for the quest.- Parameters:
id- the quest ID.time- the completion timestamp.
-
-