mirror of
https://github.com/unmojang/node-minecraft-protocol.git
synced 2025-09-26 12:41:03 -04:00
Merge pull request #586 from lluiscab/lluiscab/fix-client_echo
Fixed client echo crash on /say
This commit is contained in:
commit
6988345f98
@ -27,6 +27,7 @@ client.on('chat', function (packet) {
|
||||
const username = jsonMsg.with[0].text
|
||||
const msg = jsonMsg.with[1]
|
||||
if (username === client.username) return
|
||||
client.write('chat', { message: msg })
|
||||
if (msg.text) client.write('chat', { message: msg.text})
|
||||
else client.write('chat', { message: msg})
|
||||
}
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user