Skip to content

ADedicatedServerPlatformInternal

Bridges ADedicatedServerPlatform.start on the bootstrap thread with ServerMixin, which calls captureRunningServer from the constructed MinecraftServer once it exists.

Functions

beginBootstrap

fun beginBootstrap(): CompletableFuture<DedicatedServer>

Starts a new bootstrap wait, clearing any previously captured server. Throws if a bootstrap is already in progress.

captureRunningServer

@JvmStatic
fun captureRunningServer(server: MinecraftServer)

Called by ServerMixin when a MinecraftServer instance is constructed; completes the bootstrap future if server is a DedicatedServer.

clearBootstrap

Clears the in-progress bootstrap future without resolving it, used after a timeout falls back to latestCapturedServer.

failBootstrap

fun failBootstrap(error: Throwable)

Fails the in-progress bootstrap future with error.

latestCapturedServer

fun latestCapturedServer(): DedicatedServer?

The most recently captured DedicatedServer, if any; used as a fallback when the bootstrap future times out.