Interface PlayerLookup


public interface PlayerLookup
A simple interface for looking up online players.
  • Field Details

  • 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, Function<String,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