Interface EntityProvider<T>

Type Parameters:
T - the type of entity this provider manages
All Known Subinterfaces:
INPCs, IPlayers, ITileItems, ITileObjects, ITiles, SceneEntityProvider<T>, TileEntityProvider<T>

public interface EntityProvider<T>
Base interface for entity providers that allow querying game entities using filters.

This interface serves as the foundation for all entity provider implementations in the Storm API. It provides a simple, filter-based approach to retrieve collections of entities from the game.

Entity providers are typically accessed through the Static class and provide a convenient way to query NPCs, players, tiles, tile objects, and tile items.

See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    getAll(Predicate<? super T> filter)
    Retrieves all entities that match the specified filter.
  • Method Details

    • getAll

      List<T> getAll(Predicate<? super T> filter)
      Retrieves all entities that match the specified filter.

      This method iterates through all available entities and returns those that satisfy the given predicate. The returned list is a snapshot of matching entities at the time of invocation.

      Example usage:

       
       // Get all entities with a specific property
       List<T> filtered = provider.getAll(entity -> entity.getSomeProperty() > 10);
       
       

      Parameters:
      filter - the predicate to test each entity against; entities that return true are included
      Returns:
      a list of entities matching the filter; never null but may be empty