Server

class Server @Inject constructor(broker: Broker, val serverRef: RegisteredServer, var config: ServerConfig, proxyServer: ProxyServer, plugin: Impulse, logger: Logger? = null)

Represents a managed server instance

Constructors

Link copied to clipboard
@Inject
constructor(broker: Broker, serverRef: RegisteredServer, config: ServerConfig, proxyServer: ProxyServer, plugin: Impulse, logger: Logger? = null)

creates a new server instance

Properties

Link copied to clipboard

the server configuration

Link copied to clipboard
Link copied to clipboard
val serverRef: RegisteredServer

a reference to the server record in Velocity

Functions

Link copied to clipboard

Waits for the server to respond to Minecraft Pings

Link copied to clipboard

Gets the current status of the server

Link copied to clipboard

Handles a player disconnect event

Link copied to clipboard

Checks if the server is running

Link copied to clipboard
fun onPlayerJoin(event: ServerPostConnectEvent)

Handles the ServerPostConnectEvent

Link copied to clipboard

Reconciles the server with a new configuration

Link copied to clipboard

Removes the server from the broker

Link copied to clipboard
fun scheduleShutdown(delay: Long = config.lifecycleSettings.timeouts.inactiveGracePeriod): Result<Server>

Schedules a shutdown of the server

Link copied to clipboard

Starts the server

Link copied to clipboard

Stops the server