Skip to content

Commit

Permalink
expose _handleNbtComponent
Browse files Browse the repository at this point in the history
  • Loading branch information
extremeheat committed Jan 14, 2024
1 parent cc7fd14 commit e09176d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/client/chat.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ module.exports = function (client, options) {
// already plaintext JSON or empty
return nbtDataOrString
}
client._handleNbtComponent = handleNbtComponent

// This stores the last n (5 or 20) messages that the player has seen, from unique players
if (mcData.supportFeature('chainedChatWithHashing')) client._lastSeenMessages = new LastSeenMessages()
Expand Down
2 changes: 1 addition & 1 deletion test/common/clientHelpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ module.exports = client => {
})

client.on('playerJoin', () => {
const ChatMessage = require('prismarine-chat')(client.registry)
const ChatMessage = require('prismarine-chat')(client.registry || client.version)
client.parseMessage = (comp) => {
return new ChatMessage(comp)
}
Expand Down

0 comments on commit e09176d

Please sign in to comment.