Appearance
@loontail/minecraft-kit v0.8.14 / LaunchRunOptions
Type alias: LaunchRunOptions
ts
type LaunchRunOptions: {
killGracePeriodMs: number;
onEvent: (event) => void;
signal: AbortSignal;
};Options for kit.launch.run (and the lower-level runLaunch helper).
Example
ts
import { EventTypes, type LaunchRunOptions } from "@loontail/minecraft-kit";
const options: LaunchRunOptions = {
onEvent: (e) => {
if (e.type === EventTypes.LAUNCH_STDOUT) console.log("[game]", e.line);
},
killGracePeriodMs: 5000,
};
const session = kit.launch.run(composition, options);Type declaration
| Member | Type | Description |
|---|---|---|
killGracePeriodMs | number | Milliseconds to wait between SIGTERM and SIGKILL when aborting. |
onEvent | (event) => void | - |
signal | AbortSignal | - |