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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addObjective
(Objective objective, boolean save) void
addRequirement
(Condition condition, boolean save) void
void
addTrigger
(Trigger trigger, boolean save) void
bindToNPC
(net.citizensnpcs.api.npc.NPC npc, boolean showQuest) final long
final ArrayList<net.citizensnpcs.api.npc.NPC>
final ArrayList<net.citizensnpcs.api.npc.NPC>
final int
final Objective
getObjectiveFromID
(int objectiveID) final String
final String
getQuestDescription
(int maxLengthPerLine) final String
final String
Returns the Quest displayname if it's not blank.final String
final org.bukkit.inventory.ItemStack
final Trigger
getTriggerFromID
(int triggerID) final boolean
void
void
void
void
void
void
removeNPC
(net.citizensnpcs.api.npc.NPC npc) void
removeObjective
(Objective objective) void
removeReward
(Action action) removeTrigger
(int triggerID) void
setAcceptCooldown
(long cooldownInMinutes) void
setMaxAccepts
(int maxAccepts) void
setQuestDescription
(String newQuestDescription) void
setQuestDisplayName
(String newQuestDisplayName) void
setTakeEnabled
(boolean takeEnabled) void
setTakeItem
(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)
-