Chat message parameter is empty in 'chat' and 'whisper' events
Versions
- mineflayer: 4.23.0
- server: vanilla 1.21.1
- node: 20.0.0
Detailed description of a problem
When using the bot.on('chat') event, the message parameter is always empty, while the username is correctly captured.
What did you try yet?
I tried logging the parameters in the chat event and sending messages in chat, but the message parameter is consistently empty.
Your current code
const mineflayer = require('mineflayer')
const bot = mineflayer.createBot({
host: 'localhost', // minecraft server ip
username: 'Bot', // username to join as if auth is `offline`, else a unique identifier for this account. Switch if you want to change accounts
auth: 'microsoft' // for offline mode servers, you can set this to 'offline'
})
bot.on('chat', (username, message) => {
if (username === bot.username) return
bot.chat(message)
})
// Log errors and kick reasons:
bot.on('kicked', console.log)
bot.on('error', console.log)
Expected behaviour
I expected the message parameter to contain the text of the message sent by other players in the chat.
i have the same problem right now
Tests show it works with vanilla.
Please provide more information on how to reproduce
On Fri, Nov 1, 2024, 12:57 0x00sec @.***> wrote:
i have the same problem right now
— Reply to this email directly, view it on GitHub https://github.com/PrismarineJS/mineflayer/issues/3493#issuecomment-2451757257, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAR437RRYEJN5H2WVLJG4BTZ6NUBXAVCNFSM6AAAAABQ57R526VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINJRG42TOMRVG4 . You are receiving this because you are subscribed to this thread.Message ID: @.***>
Tests show it works with vanilla. Please provide more information on how to reproduce … On Fri, Nov 1, 2024, 12:57 0x00sec @.> wrote: i have the same problem right now — Reply to this email directly, view it on GitHub <#3493 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAR437RRYEJN5H2WVLJG4BTZ6NUBXAVCNFSM6AAAAABQ57R526VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINJRG42TOMRVG4 . You are receiving this because you are subscribed to this thread.Message ID: @.>
I tested it on multiple Vanilla servers, just to find out just now that it's caused by a mod in my own client "No Chat Reports"
i have the same problem right now
Are you using the mod "No Chat Reports"?
Is No Chat Reports causing this, still considered a bug that needs to be fixed, or can I close this?
Please give a working repro.
Please give a working repro.
Repro is already in this thread. As stated before it's the client mod of No Chat Reports. From what it looks from your screenshot, you are playing around with the Paper plugin instead?
Please give a working repro.
Repro is already in this thread. As stated before it's the client mod of No Chat Reports. From what it looks from your screenshot, you are playing around with the Paper plugin instead?
I am using the client mod, No Chat Reports.
Please give a working repro.
Repro is already in this thread. As stated before it's the client mod of No Chat Reports. From what it looks from your screenshot, you are playing around with the Paper plugin instead?
I am using the client mod, No Chat Reports.
Fabric or Forge? No Chat Reports version? More info.
Please give a working repro.
Repro is already in this thread. As stated before it's the client mod of No Chat Reports. From what it looks from your screenshot, you are playing around with the Paper plugin instead?
I am using the client mod, No Chat Reports.
Fabric or Forge? No Chat Reports version? More info.
Fabric, Latest for 1.21.1
Have same problem at vanilla server 1.21.1 paper. Mineflayer get empty messages from server, but server sends correct messages (authorization messages)
The server allows you to log in with and without a license, most likely this is the problem
I had the same issue and removing the 'No Chat Reports' Mod (as mdmanl said) on the client side fixed it for me
I have found this allows me to get the message when the server is using no chat reports:
jsonMsg.json.with[1][""]

