Interface PlayerLookup


public interface PlayerLookup
A simple interface for looking up online players.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static enum 
    The fields to take into account when searching.
    static interface 
    A query for looking up players.
  • Method Summary

    Modifier and Type
    Method
    Description
    Creates a new player lookup with the default provider and normalizer.
    create(Supplier<Collection<mindustry.gen.Player>> provider, UnaryOperator<String> normalizer)
    Creates a new player lookup with the given provider and normalizer.
    List<mindustry.gen.Player>
    Finds online players matching the given query.
  • Method Details

    • create

      static PlayerLookup create()
      Creates a new player lookup with the default provider and normalizer.
    • create

      static PlayerLookup create(Supplier<Collection<mindustry.gen.Player>> provider, UnaryOperator<String> normalizer)
      Creates a new player lookup with the given provider and normalizer.
      Parameters:
      provider - the player provider
      normalizer - the normalizer
      Returns:
      the player lookup
    • findOnlinePlayers

      List<mindustry.gen.Player> findOnlinePlayers(PlayerLookup.Query query)
      Finds online players matching the given query.
      Parameters:
      query - the query
      Returns:
      the matching players