bedrock-protocol
bedrock-protocol copied to clipboard
Minecraft supported version, and command.
Hello, i am using the bedrock-protocol library to create a bot for Minecraft Bedrock. However, I encountered an issue while trying to connect to a server running version 1.20.51. The client throws the following error:
Error: Unsupported version 1.20.51
Could you please confirm if this version is supported by the library? If not, could you provide an estimated timeline for its support or suggest a workaround?
Additionally, I would like to know how the bot can execute commands after connecting to the server. I attempted to send a command to the server using the client.queue method, but it does not work—the command is either not sent or not recognized by the server. Below is the example code I am using, but it does not work, and the command is not executed:
const { createClient } = require('bedrock-protocol');
const client = createClient({
host: '...',
port: ...,
username: '...',
offline: false,
flow: 'live'
version: '1.20.51' // I manually set this version
});
client.on('spawn', () => {
console.log('Bot connected to the server');
// Attempting to execute a command
client.queue('text', {
type: 'chat',
message: '/say test,
});
});
client.on('error', (err) => {
console.error('Client error:', err);
});
I would appreciate clarification on the following points:
- How can I correctly send and execute commands on the server?
- Is version 1.20.51 supported? If not, will support be added in the future?
Thank you for your time and assistance! Best regards, NoHaije So1o.