Class BetaCraftHandler

java.lang.Object
de.florianmichael.classic4j.BetaCraftHandler

public final class BetaCraftHandler extends Object
This class provides methods to interact with the BetaCraft API. These API methods are used to request the Multiplayer Pass for a server.
  • Field Details

    • BETACRAFT_ROOT_URI

      public static final URI BETACRAFT_ROOT_URI
      The URI of the BetaCraft API.
    • SERVER_LIST_URI

      public static final URI SERVER_LIST_URI
  • Constructor Details

    • BetaCraftHandler

      public BetaCraftHandler()
  • Method Details

    • authenticate

      public static void authenticate(JoinServerInterface joinServerInterface)
      Authenticates the player with the BetaCraft API.
      Parameters:
      joinServerInterface - The JoinServerInterface to use for the request. This is used to send the authentication request.
    • authenticate

      public static void authenticate(JoinServerInterface joinServerInterface, Consumer<Throwable> throwableConsumer)
      Authenticates the player with the BetaCraft API.
      Parameters:
      joinServerInterface - The JoinServerInterface to use for the request. This is used to send the authentication request.
    • requestServerList

      public static void requestServerList(Consumer<BCServerList> complete)
      Requests the server list from the BetaCraft API.
      Parameters:
      complete - The consumer that will be called when the request is complete.
    • requestServerList

      public static void requestServerList(Consumer<BCServerList> complete, Consumer<Throwable> throwableConsumer)
      Requests the server list from the BetaCraft API.
      Parameters:
      complete - The consumer that will be called when the request is complete.
      throwableConsumer - The consumer that will be called when an error occurs.