Skip to content

@loontail/minecraft-kit v0.8.14 / planStandaloneRuntimeInstall

Function: planStandaloneRuntimeInstall()

ts
function planStandaloneRuntimeInstall(input): Promise<InstallPlan>

Plan a runtime-only install without a Minecraft target. Useful for "Install Java/runtime" flows where the user just wants a JRE on disk and never had a Minecraft version to choose from. The returned plan is shaped exactly like a normal InstallPlan but uses a RuntimeOnlyInstallTarget that carries only the runtime + directory — the runner skips Minecraft/loader-specific stages because they have no actions in this plan.

Prefer kit.install.runtime.standalonePlan(input) over importing this directly.

Parameters

ParameterType
inputPlanStandaloneRuntimeInstallInput

Returns

Promise<InstallPlan>

Example

ts
import { detectSystem, MinecraftKit } from "@loontail/minecraft-kit";

const kit = new MinecraftKit();
const runtime = await kit.versions.runtime.resolve({ system: detectSystem() });
const plan = await kit.install.runtime.standalonePlan({
  id: "shared-jre-21",
  directory: "/opt/minecraft/runtimes",
  runtime,
});
await kit.install.runtime.run(plan);

Source

src/install/runtime-install.ts:120

MIT License