Class Quest
java.lang.Object
rocks.gravili.notquests.paper.structs.Quest
The Quest object is loaded at the start from whatever is defined in the quests.yml. It contains all data which defines
a quest, but no data of active quests (like the progress). The data it contains consists of the name, rewards, objectives,
requirements, triggers, quest npcs and much more - basically everything which can be configured in the /questsadmin command.
This data is saved into the quests.yml - not into the database.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddObjective(Objective objective, boolean save) voidaddRequirement(Condition condition, boolean save) voidvoidaddTrigger(Trigger trigger, boolean save) voidbindToNPC(net.citizensnpcs.api.npc.NPC npc, boolean showQuest) voidvoidvoidvoidvoidfinal longfinal ArrayList<net.citizensnpcs.api.npc.NPC>final ArrayList<net.citizensnpcs.api.npc.NPC>final Categoryfinal intfinal ObjectivegetObjectiveFromID(int objectiveID) final Stringfinal StringgetQuestDescription(int maxLengthPerLine) final Stringfinal StringReturns the Quest displayname if it's not blank.final Stringfinal org.bukkit.inventory.ItemStackfinal TriggergetTriggerFromID(int triggerID) final booleanvoidremoveNPC(net.citizensnpcs.api.npc.NPC npc) voidremoveObjective(Objective objective) voidremoveReward(Action action) removeTrigger(int triggerID) voidsetAcceptCooldown(long cooldownInMinutes) voidsetCategory(Category category) voidsetMaxAccepts(int maxAccepts) voidsetQuestDescription(String newQuestDescription) voidsetQuestDisplayName(String newQuestDisplayName) voidsetTakeEnabled(boolean takeEnabled) voidsetTakeItem(org.bukkit.inventory.ItemStack takeItem)
-
Constructor Details
-
Quest
-
-
Method Details
-
getCategory
-
setCategory
-
getQuestName
-
getRewards
-
clearRewards
public void clearRewards() -
getObjectives
-
getObjectiveFromID
-
getTriggerFromID
-
addObjective
-
addRequirement
-
addReward
-
addTrigger
-
clearObjectives
public void clearObjectives() -
getMaxAccepts
public final int getMaxAccepts() -
setMaxAccepts
public void setMaxAccepts(int maxAccepts) -
isTakeEnabled
public final boolean isTakeEnabled() -
setTakeEnabled
public void setTakeEnabled(boolean takeEnabled) -
getAcceptCooldown
public final long getAcceptCooldown() -
setAcceptCooldown
public void setAcceptCooldown(long cooldownInMinutes) -
getQuestDescription
-
setQuestDescription
-
getQuestDescription
-
getQuestDisplayName
-
getQuestFinalName
Returns the Quest displayname if it's not blank. Otherwise, it just returns the Quest Name- Returns:
- either the displayname or the quest name
-
setQuestDisplayName
-
getRequirements
-
clearRequirements
public void clearRequirements() -
clearNPCs
public void clearNPCs() -
bindToNPC
public void bindToNPC(net.citizensnpcs.api.npc.NPC npc, boolean showQuest) -
getAttachedNPCsWithQuestShowing
-
getAttachedNPCsWithoutQuestShowing
-
removeNPC
public void removeNPC(net.citizensnpcs.api.npc.NPC npc) -
getTriggers
-
clearTriggers
public void clearTriggers() -
removeObjective
-
removeReward
-
removeTrigger
-
getTakeItem
public final org.bukkit.inventory.ItemStack getTakeItem() -
setTakeItem
public void setTakeItem(org.bukkit.inventory.ItemStack takeItem)
-