Skip to content

When connecting to the server, the bot crashes with an error (Parse error for play.toClient: Read error for undefined : Invalid tag: 111 > 20) #3750

@Rizzener

Description

@Rizzener
  • The FAQ doesn't contain a resolution to my issue

Versions

Detailed description of a problem

When moving between proxy servers, the BungeeCord Bot crashes with the error "Parse error for play.toClient: Read error for undefined : Invalid tag: 111 > 20"

What did you try yet?

No

Your current code

import mineflayer from "mineflayer";

const options = {
    host: "funtime.su",
    port: 25565,
    username: "username",
    version: "1.21.1"
}

const bot = mineflayer.createBot(
    options
);

bot.once('login', async () => {
    console.log("Logined: " + bot.username);
});

bot.on('message', async json => {
    const text = json.toString();
    console.log(`[${bot.username}] ${text}`);
});

bot.once('spawn', async () => {
    await new Promise(r => setTimeout(r, 2000));
    bot.chat(`/an21`);
    console.log(`${bot.username} joining to server...`);
});

bot.on('error', err => {
    console.log(err.message);
})

Expected behavior

Additional context

It doesn't happen all the time, but it really interferes with my script.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Stage1just created by someone new to the project, we don't know yet if it deserves an implementation / a fpossible bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions