Class Quest
java.lang.Object
rocks.gravili.notquests.spigot.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) final longfinal ArrayList<net.citizensnpcs.api.npc.NPC>final ArrayList<net.citizensnpcs.api.npc.NPC>final 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 booleanvoidvoidvoidvoidvoidvoidremoveNPC(net.citizensnpcs.api.npc.NPC npc) voidremoveObjective(Objective objective) voidremoveReward(Action action) removeTrigger(int triggerID) voidsetAcceptCooldown(long cooldownInMinutes) voidsetMaxAccepts(int maxAccepts) voidsetQuestDescription(String newQuestDescription) voidsetQuestDisplayName(String newQuestDisplayName) voidsetTakeEnabled(boolean takeEnabled) voidsetTakeItem(org.bukkit.inventory.ItemStack takeItem)
-
Constructor Details
-
Quest
-
-
Method Details
-
getQuestName
-
getRewards
-
removeAllRewards
public void removeAllRewards() -
getObjectives
-
getObjectiveFromID
-
getTriggerFromID
-
addObjective
-
addRequirement
-
addReward
-
addTrigger
-
removeAllObjectives
public void removeAllObjectives() -
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
-
removeAllRequirements
public void removeAllRequirements() -
removeAllNPCs
public void removeAllNPCs() -
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
-
removeAllTriggers
public void removeAllTriggers() -
removeObjective
-
removeReward
-
removeTrigger
-
getTakeItem
public final org.bukkit.inventory.ItemStack getTakeItem() -
setTakeItem
public void setTakeItem(org.bukkit.inventory.ItemStack takeItem)
-