Interface TestServerConnection

All Superinterfaces:
AutoCloseable

@NonExtendable public interface TestServerConnection extends AutoCloseable
Context for a connection to a dedicated server containing various helpful functions while the connection is alive. This class implements AutoCloseable and is intended to be used in a try-with-resources statement. When closed, the client will be disconnected from the server.

Functions in this class can only be called on the client gametest thread.

  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Disconnects the client from the dedicated server.
    Gets the client world context for this connection.
  • Method Details

    • getClientWorld

      TestClientWorldContext getClientWorld()
      Gets the client world context for this connection.
      Returns:
      The client world context
    • close

      void close()
      Disconnects the client from the dedicated server.
      Specified by:
      close in interface AutoCloseable