Interface IPlayerQuestData


  • public interface IPlayerQuestData
    Tracks a player's quest progress, including active, finished, and tracked quests.
    • 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.