Interface ClientApi


public interface ClientApi
The ClientApi is a collection of methods to interact with clients, and get information about them
  • Method Summary

    Modifier and Type
    Method
    Description
    @NotNull Collection<Client>
    Get all clients that are currently known to the server
    @Nullable Client
    getClient(UUID clientUuid)
    Get a client by a player UUID, or null if the player is not online or not registered yet
    static ClientApi
    Get an instance of the client api.
    boolean
    Check if a client is registered, and has an active web connection
  • Method Details

    • getInstance

      static ClientApi getInstance()
      Get an instance of the client api. May be null if the plugin is not loaded yet
      Returns:
      instance
    • getClient

      @Nullable @Nullable Client getClient(UUID clientUuid)
      Get a client by a player UUID, or null if the player is not online or not registered yet
      Parameters:
      clientUuid - the UUID of the player
      Returns:
      the client instance, or null if the client is not connected
    • getAllClients

      @NotNull @NotNull Collection<Client> getAllClients()
      Get all clients that are currently known to the server
      Returns:
      All clients
    • isConnected

      boolean isConnected(UUID uuid)
      Check if a client is registered, and has an active web connection
      Parameters:
      uuid - the UUID of the player
      Returns:
      true if the player is connected, false if not or not registered