java.lang.Object
rocks.gravili.notquests.paper.structs.objectives.Objective
Direct Known Subclasses:
BreakBlocksObjective, BreedObjective, CollectItemsObjective, ConsumeItemsObjective, CraftItemsObjective, DeliverItemsObjective, EscortNPCObjective, InteractObjective, JobsRebornReachJobLevel, JumpObjective, KillEliteMobsObjective, KillMobsObjective, OtherQuestObjective, PlaceBlocksObjective, ProjectKorraUseAbilityObjective, ReachLocationObjective, RunCommandObjective, SlimefunResearchObjective, SmeltObjective, SneakObjective, TalkToNPCObjective, TownyNationReachTownCountObjective, TownyReachResidentCountObjective, TriggerCommandObjective

public abstract class Objective extends Object
  • Field Details

  • Constructor Details

    • Objective

      public Objective(NotQuests main)
  • Method Details

    • setQuest

      public void setQuest(Quest quest)
    • setProgressNeeded

      public void setProgressNeeded(long progressNeeded)
    • setObjectiveID

      public void setObjectiveID(int objectiveID)
    • getCompletionNPCID

      public final int getCompletionNPCID()
    • getCompletionArmorStandUUID

      public final UUID getCompletionArmorStandUUID()
    • setCompletionNPCID

      public final void setCompletionNPCID(int completionNPCID, boolean save)
    • setCompletionArmorStandUUID

      public final void setCompletionArmorStandUUID(UUID completionArmorStandUUID, boolean save)
    • getObjectiveID

      public final int getObjectiveID()
    • getProgressNeeded

      public final long getProgressNeeded()
    • getConditions

      public final ArrayList<Condition> getConditions()
    • getRewards

      public final ArrayList<Action> getRewards()
    • addCondition

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

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

      public void removeCondition(Condition condition, boolean save)
    • removeReward

      public void removeReward(Action action, boolean save)
    • clearRewards

      public void clearRewards()
    • clearConditions

      public void clearConditions()
    • getObjectiveDisplayName

      public final String getObjectiveDisplayName()
    • getObjectiveFinalName

      public final String getObjectiveFinalName()
    • setObjectiveDisplayName

      public void setObjectiveDisplayName(String newObjectiveDisplayName, boolean save)
    • removeObjectiveDisplayName

      public void removeObjectiveDisplayName(boolean save)
    • getObjectiveDescription

      public final String getObjectiveDescription()
    • getObjectiveDescription

      public final String getObjectiveDescription(int maxLengthPerLine)
      Gets the objective description, but also adds line-breaks so the description is not bigger than the screen (useful for the GUI)
      Parameters:
      maxLengthPerLine - how long the description can be per-line
      Returns:
      the description of the objective with proper line-breaks
    • setObjectiveDescription

      public void setObjectiveDescription(String newObjectiveDescription, boolean save)
    • removeObjectiveDescription

      public void removeObjectiveDescription(boolean save)
    • getQuest

      public final Quest getQuest()
    • getObjectiveTaskDescription

      public abstract String getObjectiveTaskDescription(String eventualColor, org.bukkit.entity.Player player)
    • save

      public abstract void save(org.bukkit.configuration.file.FileConfiguration configuration, String initialPath)
    • load

      public abstract void load(org.bukkit.configuration.file.FileConfiguration configuration, String initialPath)
    • onObjectiveUnlock

      public abstract void onObjectiveUnlock(ActiveObjective activeObjective)