Open SinanAkkoyun opened 6 months ago
try
const bot = mineflayer.createBot({
host: 'server_ip',
auth: 'microsoft',
version: '1.20.2',
});
dont worry about the username, if you signed in correctly through microsoft itll know the username
nvm, I tried to move my bot to 1.20.3 and got the same error you did
I appriceate you trying it out too, it has nothing to do with the username. Chat messages, names etc inside that server must somehow be wrongly formatted because it's a multi version server (not a mineflayer error per-se I think) The solution would be: If JSON parsing fails (needs to be done for chat messages, entity names etc), try catch that and return a string instead of JSON
That's just a guess, before I PR anything I'd like to hear an opinion from someone who really knows whats going on
Versions
Detailed description of a problem
When joining a server like GommeHD.net, following error sometimes occurs:
The server has a multi-version protocol which lets players from 1.8 to 1.20.4 play together.
What did you try yet?
Your current code
It's code independent
Expected behavior
Code should, if invalid JSON, catch that error and instead output string.
Additional context
/