Class Quest
java.lang.Object
com.ryankshah.questapi.api.quest.Quest
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).
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionbooleanIftrue, this quest skips theAVAILABLEstate and becomesACTIVEthe moment its prerequisites are satisfied, without requiring the player to manually start it.static Quest.Builderbuilder(net.minecraft.resources.Identifier id) net.minecraft.resources.Identifiernet.minecraft.network.chat.Componentnet.minecraft.world.item.ItemStackicon()net.minecraft.resources.Identifierid()booleanIftrue, this quest automatically returns toAVAILABLEsome time after being rewarded, instead of staying in the terminalREWARDEDstate forever.intThe cooldown length: hours if the resolvedResetModeisResetMode.WALL_CLOCK, in-game days if it isResetMode.IN_GAME_DAY.How this quest's cooldown is measured, ornullto use the server's configured default (seequestapi.properties).rewards()intLower values are displayed first within a category.net.minecraft.network.chat.Componenttitle()
-
Method Details
-
builder
-
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
-
rewards
-
prerequisites
-
autoActivate
public boolean autoActivate()Iftrue, this quest skips theAVAILABLEstate and becomesACTIVEthe 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()Iftrue, this quest automatically returns toAVAILABLEsome time after being rewarded, instead of staying in the terminalREWARDEDstate forever. -
resetMode
How this quest's cooldown is measured, ornullto use the server's configured default (seequestapi.properties). Meaningless unlessrepeatable()istrue. -
resetAmount
public int resetAmount()The cooldown length: hours if the resolvedResetModeisResetMode.WALL_CLOCK, in-game days if it isResetMode.IN_GAME_DAY. Meaningless unlessrepeatable()istrue.
-