java.lang.Object
rocks.gravili.notquests.paper.structs.Quest

public class Quest extends Object
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 Details

  • Method Details

    • getCategory

      public final Category getCategory()
    • setCategory

      public void setCategory(Category category)
    • getQuestName

      public final String getQuestName()
    • getRewards

      public final ArrayList<Action> getRewards()
    • clearRewards

      public void clearRewards()
    • getObjectives

      public final ArrayList<Objective> getObjectives()
    • getObjectiveFromID

      public final Objective getObjectiveFromID(int objectiveID)
    • getTriggerFromID

      public final Trigger getTriggerFromID(int triggerID)
    • addObjective

      public void addObjective(Objective objective, boolean save)
    • addRequirement

      public void addRequirement(Condition condition, boolean save)
    • addReward

      public void addReward(Action action, boolean save)
    • addTrigger

      public void addTrigger(Trigger trigger, boolean save)
    • 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

      public final String getQuestDescription()
    • setQuestDescription

      public void setQuestDescription(String newQuestDescription)
    • getQuestDescription

      public final String getQuestDescription(int maxLengthPerLine)
    • getQuestDisplayName

      public final String getQuestDisplayName()
    • getQuestFinalName

      public final String 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

      public void setQuestDisplayName(String newQuestDisplayName)
    • getRequirements

      public final ArrayList<Condition> getRequirements()
    • clearRequirements

      public void clearRequirements()
    • clearNPCs

      public void clearNPCs()
    • bindToNPC

      public void bindToNPC(net.citizensnpcs.api.npc.NPC npc, boolean showQuest)
    • getAttachedNPCsWithQuestShowing

      public final ArrayList<net.citizensnpcs.api.npc.NPC> getAttachedNPCsWithQuestShowing()
    • getAttachedNPCsWithoutQuestShowing

      public final ArrayList<net.citizensnpcs.api.npc.NPC> getAttachedNPCsWithoutQuestShowing()
    • removeNPC

      public void removeNPC(net.citizensnpcs.api.npc.NPC npc)
    • getTriggers

      public final ArrayList<Trigger> getTriggers()
    • clearTriggers

      public void clearTriggers()
    • removeObjective

      public void removeObjective(Objective objective)
    • removeReward

      public void removeReward(Action action)
    • removeTrigger

      public String removeTrigger(int triggerID)
    • getTakeItem

      public final org.bukkit.inventory.ItemStack getTakeItem()
    • setTakeItem

      public void setTakeItem(org.bukkit.inventory.ItemStack takeItem)