Search code examples
javascriptminecraftmineflayer

Server rejected transaction for clicking on slot ${slot}, on window with id ${window?.id}


I am trying to click on the window in the minecraft server menu, but when I try to do this I get an error:

throw new Error(`Server rejected transaction for clicking on slot ${slot}, on window with id ${window?.id}.`)

I think this is due to the fact that the server is constantly updating the menu, because everything works with a static menu (the bot clicks only 1 time and on the right slot)

Here is part of my code:

bot.setQuickBarSlot(0)
bot.activateItem()
setTimeout(() => bot.simpleClick.rightMouse(10), 1000)

A gif showing how the server changes the menu:

A gif showing how the server changes the menu:

During this change, the server somehow opens a new window (this can be seen using event windowOpen)

I tried adding delays between clicks and removing them, but nothing helped

Help pls


Solution

  • I solved my problem by using new version of minecraft.