npm.io
1.1.1 • Published 6 years ago

@xmcl/launch

Licence
MIT
Version
1.1.1
Deps
5
Size
69 kB
Vulns
2
Weekly
0
Stars
220
DeprecatedThis package is deprecated

Launch Module

npm version npm Build Status

This is a sub-module belong to minecraft-launcher-core module. You can still use this individually.

Launch

Launch minecraft from a version:

    import { Launcher } from "@xmcl/launch"
    const version: string; // full version id, like 1.13, or your forge version like, 1.13-forge-<someForgeVersion>
    const javaPath: string; // java executable path
    const gamePath: string; // .minecraft path
    const proc: Promise<ChildProcess> = Launcher.launch({ gamePath, javaPath, version });

Detach from the parent process. So your launcher's exit/crash won't affact the Minecraft running.

    const proc: Promise<ChildProcess> = Launcher.launch({ gamePath, javaPath, version, extraExecOption: { detached: true } });

Keywords