Closed TheTechPony closed 7 years ago
didnt mean to close it https://i.gyazo.com/d6f0585285bb9b21af91a7f1c6604329.png
What version are you connecting to ?
might be related to https://github.com/PrismarineJS/node-minecraft-protocol/issues/464 (84) is it a custom server ? (server with plugins etc ?)
I got it to work now but the chat event isn't working still.
It's this server right now if you want to come on and look: play.mineraze.us
This is my code currently http://pastebin.com/MpZV24UA
About the chat event, see https://github.com/PrismarineJS/mineflayer/blob/master/examples/chatAddPattern.js
So I have to add chat patterns for every server? How do I get the raw chat data? I can't seem to get it to work still.
you can use https://github.com/PrismarineJS/mineflayer/blob/master/doc/api.md#message-jsonmsg
Yes you have to add chat patterns for server for use a particular chat plugin, because they have their own chat format
I've fixed a majority of my issues but I don't understand what I'm looking at when it comes to minecraft regex. I've googled around and can't find much of anything.
what is displayed when you do bot.on('message',message => console.log(message))
?
https://gyazo.com/d488bf3c43409d5d8514100f93685d73 If I could just get a small push in the right direction I'd be able to teach myself but I've never worked with regex before
Can you use http://pastebin.com/ and copy paste instead of posting screenshots ?
can you post the result of bot.on('message',message => console.log(JSON.stringify(message,null,2)))
The idea is to see what the messages look like, so we can extract the content from it.
There's a whisper at the bottom http://pastebin.com/x0LevtYK
I thought I found a workaround but it wouldn't let me pull usernames. If you could link me to some resources then I'm sure I'd be able to figure it out on my own. I've copied the raw message into regexr.com but I don't know how to deal with the color signs
After some intensive google'ing I've solved my issue. Thanks for the support. :+1:
A fresh install of mineflayer and minecraft-protocol cause me to get this error https://gyazo.com/c26c38f466f1bde71d639d1abd659cbd.png
And when I somehow got it to work the chat even wasn't working.