Interface ClientProvider


public interface ClientProvider
Provides access to all connected game clients.
  • Method Details

    • getClient

      Optional<Client> getClient(String name)
      Returns the client with the given name, if connected.
      Parameters:
      name - the client name to look up
      Returns:
      an Optional containing the client, or empty if not found
    • getClients

      Collection<Client> getClients()
      Returns all currently connected clients.
      Returns:
      an unmodifiable collection of connected clients
    • getClientNames

      Set<String> getClientNames()
      Returns the names of all currently connected clients.
      Returns:
      an unmodifiable set of client names