Skip to content

@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

MemberTypeDescription
killGracePeriodMsnumberMilliseconds to wait between SIGTERM and SIGKILL when aborting.
onEvent(event) => void-
signalAbortSignal-

Source

src/types/launch.ts:171

MIT License