Class Objective

java.lang.Object
com.hypixel.hytale.builtin.adventure.objectives.Objective
All Implemented Interfaces:
NetworkSerializable<Objective>

public class Objective extends Object implements NetworkSerializable<Objective>
  • Field Details

  • Constructor Details

    • Objective

      public Objective(@Nonnull ObjectiveAsset asset, @Nullable UUID objectiveUUID, @Nonnull Set<UUID> playerUUIDs, @Nonnull UUID worldUUID, @Nullable UUID markerUUID)
      Default Constructor for an Objective instance
      Parameters:
      asset - The asset associated with the objective
      objectiveUUID - The UUID instance of the objective, or null if not configured
      playerUUIDs - The set of player UUID instances for this objective
      worldUUID - The UUID instance of the affiliated world
      markerUUID - The UUID instance of the marker, or null if not configured
  • Method Details

    • getObjectiveUUID

      @Nonnull public UUID getObjectiveUUID()
    • getObjectiveId

      @Nonnull public String getObjectiveId()
    • getObjectiveAsset

      @Nullable public ObjectiveAsset getObjectiveAsset()
    • getObjectiveLineHistoryData

      @Nullable public ObjectiveLineHistoryData getObjectiveLineHistoryData()
    • setObjectiveLineHistoryData

      public void setObjectiveLineHistoryData(@Nullable ObjectiveLineHistoryData objectiveLineHistoryData)
    • getObjectiveHistoryData

      @Nonnull public ObjectiveHistoryData getObjectiveHistoryData()
    • getObjectiveLineAsset

      @Nullable public ObjectiveLineAsset getObjectiveLineAsset()
    • getPlayerUUIDs

      public Set<UUID> getPlayerUUIDs()
    • getActivePlayerUUIDs

      @Nonnull public Set<UUID> getActivePlayerUUIDs()
    • getCurrentTasks

      @Nullable public ObjectiveTask[] getCurrentTasks()
    • getCurrentTaskSetIndex

      public int getCurrentTaskSetIndex()
    • getCurrentDescription

      public String getCurrentDescription()
    • isCompleted

      public boolean isCompleted()
    • getWorldUUID

      public UUID getWorldUUID()
    • getMarkerUUID

      @Nullable public UUID getMarkerUUID()
    • isDirty

      public boolean isDirty()
    • getObjectiveItemStarter

      public ItemStack getObjectiveItemStarter()
    • setObjectiveItemStarter

      public void setObjectiveItemStarter(@Nonnull ItemStack objectiveItemStarter)
    • setup

      public boolean setup(@Nonnull Store<EntityStore> componentAccessor)
    • setupCurrentTasks

      public boolean setupCurrentTasks(@Nonnull Store<EntityStore> store)
    • checkTaskSetCompletion

      public boolean checkTaskSetCompletion(@Nonnull Store<EntityStore> store)
    • complete

      public void complete(@Nonnull Store<EntityStore> store)
    • cancel

      public void cancel()
      If you want to handle UI and DataStore at the same time, you want to look at this method instead: ObjectivePlugin.cancelObjective(UUID, Store)
    • unload

      public void unload()
    • reloadObjectiveAsset

      public void reloadObjectiveAsset(@Nonnull Map<String, ObjectiveAsset> reloadedAssets)
    • forEachParticipant

      public void forEachParticipant(@Nonnull Consumer<Ref<EntityStore>> consumer)
    • forEachParticipant

      public <T> void forEachParticipant(@Nonnull BiConsumer<Ref<EntityStore>, T> consumer, T meta)
    • forEachParticipant

      public <T,U> void forEachParticipant(@Nonnull TriConsumer<Ref<EntityStore>, T, U> consumer, @Nonnull T t, @Nonnull U u)
    • getPosition

      @Nullable public org.joml.Vector3d getPosition(@Nonnull ComponentAccessor<EntityStore> componentAccessor)
    • addActivePlayerUUID

      public void addActivePlayerUUID(UUID playerUUID)
    • removeActivePlayerUUID

      public void removeActivePlayerUUID(UUID playerUUID)
    • markDirty

      public void markDirty()
    • consumeDirty

      public boolean consumeDirty()
    • toPacket

      @Nonnull public Objective toPacket()
      Specified by:
      toPacket in interface NetworkSerializable<Objective>
    • toString

      @Nonnull public String toString()
      Overrides:
      toString in class Object