Pierce01 / MinecraftLauncher-core

Lightweight module that downloads and runs Minecraft using javascript / NodeJS
MIT License
356 stars 81 forks source link

Error when connecting to server #103

Closed Timasbro closed 1 year ago

Timasbro commented 1 year ago
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

Pierce01 commented 1 year ago

You need to post the error you're getting