Class Quest

java.lang.Object
com.ryankshah.questapi.api.quest.Quest

public final class Quest extends Object
Immutable, static definition of a quest: its identity, presentation, objectives, rewards and unlock conditions. Holds no player-specific state whatsoever - see QuestProgress for that.

Build one with builder(Identifier).

  • Method Details

    • builder

      public static Quest.Builder builder(net.minecraft.resources.Identifier id)
    • id

      public net.minecraft.resources.Identifier id()
    • title

      public net.minecraft.network.chat.Component title()
    • description

      public net.minecraft.network.chat.Component description()
    • icon

      public net.minecraft.world.item.ItemStack icon()
    • categoryId

      public net.minecraft.resources.Identifier categoryId()
    • objectives

      public List<ObjectiveDefinition> objectives()
    • rewards

      public List<QuestReward> rewards()
    • prerequisites

      public List<QuestCondition> prerequisites()
    • autoActivate

      public boolean autoActivate()
      If true, this quest skips the AVAILABLE state and becomes ACTIVE the moment its prerequisites are satisfied, without requiring the player to manually start it.
    • sortOrder

      public int sortOrder()
      Lower values are displayed first within a category.
    • repeatable

      public boolean repeatable()
      If true, this quest automatically returns to AVAILABLE some time after being rewarded, instead of staying in the terminal REWARDED state forever.
    • resetMode

      public ResetMode resetMode()
      How this quest's cooldown is measured, or null to use the server's configured default (see questapi.properties). Meaningless unless repeatable() is true.
    • resetAmount

      public int resetAmount()
      The cooldown length: hours if the resolved ResetMode is ResetMode.WALL_CLOCK, in-game days if it is ResetMode.IN_GAME_DAY. Meaningless unless repeatable() is true.