Interface PlayerLookup
public interface PlayerLookup
A simple interface for looking up online players.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumThe fields to take into account when searching.static interfaceA query for looking up players. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic PlayerLookupcreate()Creates a new player lookup with the default provider and normalizer.static PlayerLookupCreates a new player lookup with the given provider and normalizer.List<mindustry.gen.Player>Finds online players matching the given query.
-
Field Details
-
DEFAULT_PROVIDER
-
DEFAULT_NORMALIZER
-
-
Method Details
-
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 providernormalizer- the normalizer- Returns:
- the player lookup
-
findOnlinePlayers
Finds online players matching the given query.- Parameters:
query- the query- Returns:
- the matching players
-