Skip to content

@loontail/minecraft-kit v0.8.14 / MinecraftKitOptions

Type alias: MinecraftKitOptions

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

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);

Type declaration

MemberTypeDescription
cacheMetadataCache-
hostAllowListreadonly 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.
httpClientHttpClient-
loggerLogger-
spawnerSpawner-
systemRuntimeSystem-

Source

src/kit.ts:48

MIT License