bedrock-protocol: 1.19.10 Chat is not being read

I am using the example scripts to listen to chat and chat is not being listened to. This was working fine on 1.19.1 and now is not working on 1.19.10.

const bedrock = require('bedrock-protocol')
const client = bedrock.createClient({   // optional
  realms: {
    realmInvite: "https://realms.gg/I4Pm46UEw6I"
  },         // optional, default 19132
  username: 'Wilco Realm Bot',   // the username you want to join as, optional if online mode
})

client.on('text', (packet) => { // Listen for chat messages and echo them back.
  if (packet.source_name != client.username) {
    client.queue('text', {
      type: 'chat', needs_translation: false, source_name: client.username, xuid: '', platform_chat_id: '',
      message: `${packet.source_name} said: ${packet.message} on ${new Date().toLocaleString()}`
    })
  }
})

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 29 (16 by maintainers)

Most upvoted comments

No updates to this, closing. Seems this is a Realms issue as it cannot be reproduced outside of Realms and happens to non-bedrock-protocol clients also - https://bugs.mojang.com/browse/REALMS-9150. Please re-open if this you think is a confirmed issue with bedrock-protocol specifically.

OK, if the client spawns then it should be able to correctly receive chat messages. Can you reproduce this on other servers? If not, this certainly seems to be an issue on server side (see Lucien’s links to bug reports on the topic).

It is working on my BDS which is running 1.19.10. my realm running 1.19.11 is not logging chat packets at all.