Open Koteinik opened 2 years ago
Also, I have update my node.js version to latest of 16.x
This is a bug in node-minecraft-protocol. You are being kicked by the server. node-minecraft-protocol tries to figure out why by parsing the reason as a json string but fails and throws this error.
Made a bug report with node-minecraft-protocol https://github.com/PrismarineJS/node-minecraft-protocol/issues/989
You can try and fix node-minecraft-protocol yourself in your node_modules folder to see why the server is kicking you.
Maybe I can place try/catch on json parse, and if fails, just return?
Versions
Detailed description of a problem
I am making an AFK bot, just for fun. After running about some hours, it throws errors.
What did you try yet?
Try-cathes, and repl.it while loop (not working).
Your current code
Expected behavior
I also installed mineflayer-antiafk, and the bot runs good until exceptions.
Additional context
I have this exception:
Also, sometimes I recieve exception that block what bot tries to dig is null