Contents
Class BountyObjectiveTask
java.lang.Object
com.hypixel.hytale.builtin.adventure.objectives.task.ObjectiveTask
com.hypixel.hytale.builtin.adventure.npcobjectives.task.BountyObjectiveTask
- All Implemented Interfaces:
KillTask, NetworkSerializer<Objective, ObjectiveTask>
An objective task representing a bounty that requires the player to eliminate a specific NPC.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final BuilderCodec<BountyObjectiveTask> The codec used to parseBountyObjectiveTaskinstances.Fields inherited from class ObjectiveTask
BASE_CODEC -
Constructor Summary
ConstructorsConstructorDescriptionBountyObjectiveTask(ObjectiveTaskAsset asset, int taskSetIndex, int taskIndex) -
Method Summary
Modifier and TypeMethodDescriptionbooleanvoidcheckKilledEntity(Store<EntityStore> store, Ref<EntityStore> npcRef, Objective objective, NPCEntity npc, Damage damageInfo) Checks if the killed entity satisfies the conditions of the kill task and updates the objective progress accordingly.getAsset()static StringtoString()Methods inherited from class ObjectiveTask
addMarker, areTaskConditionsFulfilled, assetChanged, complete, completeTransactionRecords, consumeTaskConditions, getMarkers, getNonSerializedTransactionRecords, getSerializedTransactionRecords, isComplete, removeMarker, revertTransactionRecords, sendUpdateObjectiveTaskPacket, setAsset, setup, unloadTransactionRecords
-
Field Details
-
CODEC
The codec used to parseBountyObjectiveTaskinstances.
-
-
Constructor Details
-
BountyObjectiveTask
-
-
Method Details
-
getAsset
- Overrides:
getAssetin classObjectiveTask
-
checkCompletion
public boolean checkCompletion()- Specified by:
checkCompletionin classObjectiveTask
-
getBountyMarkerIDFromUUID
-
checkKilledEntity
public void checkKilledEntity(@Nonnull Store<EntityStore> store, @Nonnull Ref<EntityStore> npcRef, @Nonnull Objective objective, @Nonnull NPCEntity npc, @Nonnull Damage damageInfo) Description copied from interface:KillTaskChecks if the killed entity satisfies the conditions of the kill task and updates the objective progress accordingly.- Specified by:
checkKilledEntityin interfaceKillTask- Parameters:
store- TheStore<EntityStore>for component access.npcRef- The entity reference of the killed NPC entity.objective- TheObjectiveassociated with this kill task.npc- TheNPCEntitycomponent of the killed entity.damageInfo- TheDamageinformation related to the kill event.
-
toPacket
- Specified by:
toPacketin interfaceNetworkSerializer<Objective, ObjectiveTask>
-
toString
- Overrides:
toStringin classObjectiveTask
-