Skip to content

@loontail/minecraft-kit / MinecraftKitOptions

Type Alias: MinecraftKitOptions

ts
type MinecraftKitOptions = {
  cache?: MetadataCache;
  hostAllowList?: readonly string[];
  httpClient?: HttpClient;
  logger?: Logger;
  spawner?: Spawner;
  system?: RuntimeSystem;
};

Defined in: src/kit.ts:53

Constructor options for MinecraftKit.

Example

ts
import { consoleLogger, MinecraftKit, type MinecraftKitOptions } from "@loontail/minecraft-kit";

const options: MinecraftKitOptions = { logger: consoleLogger };
const kit = new MinecraftKit(options);

Properties

PropertyModifierTypeDescriptionDefined in
cache?readonlyMetadataCache-src/kit.ts:55
hostAllowList?readonlyreadonly string[]Host allow-list applied to every install/repair file download. Download URLs come from network-fetched manifests, so pinning them to a known set of hosts closes a supply-chain MITM/manifest-rewrite vector. Defaults to DEFAULT_DOWNLOAD_HOST_ALLOWLIST (the Mojang/Fabric/Forge ecosystem). Entries support a leading wildcard label, e.g. "*.minecraft.net". Pass a custom list to add a private mirror.src/kit.ts:66
httpClient?readonlyHttpClient-src/kit.ts:54
logger?readonlyLogger-src/kit.ts:56
spawner?readonlySpawner-src/kit.ts:58
system?readonlyRuntimeSystem-src/kit.ts:57

MIT License