From b9d9f1642467d36ac0631004702bcc6f70407254 Mon Sep 17 00:00:00 2001 From: u9g Date: Mon, 7 Sep 2026 07:36:40 -0400 Subject: [PATCH] game: send the client brand once per connection, as the vanilla client does --- lib/plugins/game.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/plugins/game.js b/lib/plugins/game.js index d3291b06ea..a222f3b8ee 100644 --- a/lib/plugins/game.js +++ b/lib/plugins/game.js @@ -111,8 +111,11 @@ function inject (bot, options) { bot.emit('login') bot.emit('game') + // The brand is sent once per connection: from 1.20.2 node-minecraft-protocol sends it on the + // first entry into the configuration state, where the vanilla client sends it after + // login_acknowledged. Before the configuration state the client sends it on joining the world. // varint length-prefixed string as data - bot._client.writeChannel(brandChannel, options.brand) + if (!bot.supportFeature('hasConfigurationState')) bot._client.writeChannel(brandChannel, options.brand) }) bot._client.on('respawn', (packet) => {