Skip to content

@loontail/minecraft-kit v0.8.14 / EventTypes

Variable: EventTypes

ts
const EventTypes: {
  ARCHIVE_EXTRACTED: "archive:extracted";
  DOWNLOAD_COMPLETED: "download:completed";
  DOWNLOAD_FAILED: "download:failed";
  DOWNLOAD_PROGRESS: "download:progress";
  DOWNLOAD_SKIPPED: "download:skipped";
  DOWNLOAD_STARTED: "download:started";
  FORGE_PROCESSOR_COMPLETED: "forge:processor-completed";
  FORGE_PROCESSOR_OUTPUT_VERIFIED: "forge:processor-output-verified";
  FORGE_PROCESSOR_STARTED: "forge:processor-started";
  INSTALL_PHASE_CHANGED: "install:phase-changed";
  INTEGRITY_MISMATCH: "integrity:mismatch";
  INTEGRITY_VERIFIED: "integrity:verified";
  LAUNCH_ABORTED: "launch:aborted";
  LAUNCH_EXITED: "launch:exited";
  LAUNCH_STARTED: "launch:started";
  LAUNCH_STARTING: "launch:starting";
  LAUNCH_STDERR: "launch:stderr";
  LAUNCH_STDOUT: "launch:stdout";
  VERIFY_FILE_CHECKED: "verify:file-checked";
};

Stable string constants for the type discriminator of every ProgressEvent. Use these instead of bare string literals when filtering events.

Example

ts
import { EventTypes } from "@loontail/minecraft-kit";

await kit.install.run(plan, {
  onEvent: (e) => {
    if (e.type === EventTypes.DOWNLOAD_PROGRESS) updateBar(e.bytesDownloaded, e.totalBytes);
    if (e.type === EventTypes.INSTALL_PHASE_CHANGED) setPhase(e.phase);
  },
});

Type declaration

MemberTypeValue
ARCHIVE_EXTRACTED"archive:extracted""archive:extracted"
DOWNLOAD_COMPLETED"download:completed""download:completed"
DOWNLOAD_FAILED"download:failed""download:failed"
DOWNLOAD_PROGRESS"download:progress""download:progress"
DOWNLOAD_SKIPPED"download:skipped""download:skipped"
DOWNLOAD_STARTED"download:started""download:started"
FORGE_PROCESSOR_COMPLETED"forge:processor-completed""forge:processor-completed"
FORGE_PROCESSOR_OUTPUT_VERIFIED"forge:processor-output-verified""forge:processor-output-verified"
FORGE_PROCESSOR_STARTED"forge:processor-started""forge:processor-started"
INSTALL_PHASE_CHANGED"install:phase-changed""install:phase-changed"
INTEGRITY_MISMATCH"integrity:mismatch""integrity:mismatch"
INTEGRITY_VERIFIED"integrity:verified""integrity:verified"
LAUNCH_ABORTED"launch:aborted""launch:aborted"
LAUNCH_EXITED"launch:exited""launch:exited"
LAUNCH_STARTED"launch:started""launch:started"
LAUNCH_STARTING"launch:starting""launch:starting"
LAUNCH_STDERR"launch:stderr""launch:stderr"
LAUNCH_STDOUT"launch:stdout""launch:stdout"
VERIFY_FILE_CHECKED"verify:file-checked""verify:file-checked"

Source

src/types/events.ts:21

MIT License