const { Client, Authenticator } = require('minecraft-launcher-core');
const launcher = new Client();
let opts = {
// For production launchers, I recommend not passing
// the getAuth function through the authorization field and instead
// handling authentication outside before you initialize
// MCLC so you can handle auth based errors and validation!
authorization: Authenticator.getAuth("tim_as"),
root: "./minecraft",
version: {
number: "1.14",
type: "release"
},
memory: {
max: "3G",
min: "1G"
},
server: {
host: "PLAY.FENDICRAFT.RU"
}
}
launcher.launch(opts);
launcher.on('debug', (e) => console.log(e));
launcher.on('data', (e) => console.log(e));
Minecraft is starting, and closing after it