Appearance
@loontail/minecraft-kit v0.8.14 / detectSystem
Function: detectSystem()
ts
function detectSystem(input): RuntimeSystemResolve the current host system identifiers.
Most callers do not need to invoke this directly: the MinecraftKit constructor defaults to detectSystem() when no system option is supplied, and kit.targets.system exposes the cached result. Use this helper when you want to override one of the host values (e.g. force a different arch for a cross-platform runtime install) before constructing the kit.
Parameters
| Parameter | Type |
|---|---|
input | DetectSystemInput |
Returns
Throws
MinecraftKitError with code RUNTIME_UNSUPPORTED_PLATFORM when the platform/arch combination is not understood.
Example
ts
import { detectSystem } from "@loontail/minecraft-kit";
const system = detectSystem();
console.log(system.os, system.arch); // → e.g. "windows" "x64"