Interface TestSingleplayerContext

All Superinterfaces:
AutoCloseable

@NonExtendable public interface TestSingleplayerContext extends AutoCloseable
Context for a client gametest containing various helpful functions while a singleplayer game is open.

Unless otherwise specified, methods in this class can only be called on the client gametest thread.

  • Method Details

    • getWorldSave

      TestWorldSave getWorldSave()
      Gets the handle for the world save.

      This method can be called from any thread.

      Returns:
      The handle for the world save
    • getConnection

      TestServerConnection getConnection()
      Gets the handle for the client level.

      This method can be called from any thread.

      Returns:
      The handle for the client level
    • getServer

      TestServerContext getServer()
      Gets the handle for the integrated server.

      This method can be called from any thread.

      Returns:
      The handle for the integrated server
    • close

      void close()
      Closes the singleplayer world.
      Specified by:
      close in interface AutoCloseable