Skip to content

Commit

Permalink
fix: update chat message format for version 1.19
Browse files Browse the repository at this point in the history
  • Loading branch information
zardoy committed Nov 5, 2024
1 parent 1f02a6d commit 1d160d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/modules/chat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ export const player = function (player: Player, serv: Server, settings: Options)
const sendChat = (message, isSystem) => {
if (typeof message === 'string') message = serv.parseClassic(message)
if (versionToNumber(settings.version) >= versionToNumber('1.19')) {
player._client.write('systemChat', { message: JSON.stringify(message), position: isSystem ? 2 : 0, sender: '0' })
player._client.write('systemChat', { formattedMessage: JSON.stringify(message), position: isSystem ? 2 : 0, sender: '0' })
} else {
player._client.write('chat', { message: JSON.stringify(message), position: isSystem ? 2 : 0, sender: '0' })
}
Expand Down

0 comments on commit 1d160d5

Please sign in to comment.