Skip to content

Kicks from the server when receiving a resource pack. #3768

@Rizzener

Description

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

Versions

  • mineflayer: 4.33.0
  • server: BungeeCord 1.21-R0.4 - Paper
  • node: 24.1.0

Detailed description of a problem

There are no problems when logging into the hub, but when connecting to a subserver on version 1.21, the server offers a resource pack, but the problem is I can't accept or decline it. Either way, I get kicked from the server for no reason.

Your current code

import mineflayer from "mineflayer";

const bot = mineflayer.createBot({
    host: 'neo.funtime.sh',
    port: 25565,
    username: '6055_42',
    version: '1.21.8'
});

bot.on('spawn', () => {
    console.log('Join to anarchy')
    bot.chat("/an11") // Joining a server with version 1.21 from the lobby (BungeeCord)
})
bot.on('resourcePack', () => {
    console.log('Resource pack received');
    bot.acceptResourcePack();
    console.log('Resource pack accepted');
})
bot.on('message', (message) => {
    console.log(`${message.toString()}`)
})
bot.on('kicked', (reason) => {
    console.log('Kicked:', reason);
})
bot.on('error', (error) => {
    console.error(`Error: ${error}`);
})
bot.on('end', (reason) => {
    console.log(`End: ${reason}`);
})

Expected behavior

Successful connection to the server without kicking; resource pack is not important.

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