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.