Interface InventoryChangeAware

All Known Implementing Classes:
GatherObjectiveTask

public interface InventoryChangeAware
Interface for objective tasks that need to react to inventory changes.

Implementations are called by ObjectiveInventoryChangeSystem whenever an InventoryChangeEvent fires on a player with active objectives.

  • Method Details

    • onInventoryChange

      void onInventoryChange(@Nonnull Objective objective, @Nonnull Ref<EntityStore> playerRef, @Nonnull Store<EntityStore> store, @Nonnull InventoryChangeEvent event)
      Called when an inventory change occurs on a player participating in the given objective.
      Parameters:
      objective - The objective this task belongs to.
      playerRef - The ref to the player whose inventory changed.
      store - The entity store.
      event - The inventory change event.