Interface TestDedicatedServerConnection
- All Superinterfaces:
AutoCloseable, TestServerConnection
@NonExtendable
public interface TestDedicatedServerConnection
extends TestServerConnection, AutoCloseable
Context for a client gametest containing various helpful functions while a connection to a dedicated server is open.
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.
Unless otherwise specified, methods in this class can only be called on the client gametest thread.
-
Field Summary
Fields inherited from interface TestServerConnection
DEFAULT_CHUNK_LOAD_TIMEOUT -
Method Summary
Methods inherited from interface TestServerConnection
getClientLevel, getClientPlayer, getServerLevel, getServerPlayer, waitForChunksDownload, waitForChunksDownload, waitForChunksRender, waitForChunksRender, waitForChunksRender, waitForChunksRender, waitForClientboundEntityUpdates, waitForClientboundPackets, waitForServerboundPackets
-
Method Details
-
close
void close()Disconnects the client from the dedicated server.- Specified by:
closein interfaceAutoCloseable
-