Update main/chatparser.js

This commit is contained in:
Yaode_owo 2024-10-12 09:49:48 -04:00
parent cacadafd59
commit 3d25099f44

View file

@ -35,7 +35,7 @@ function inject(bot) {
bot.on('system_chat', (packet) => { // system
if (packet.isActionBar) return;
let systemchat = {};
systemchat.jsonMsg = packet.content;
systemchat.jsonMsg = JSON.parse(processNbtMessage(packet.content));
systemchat.message = parseMinecraftMessage(processNbtMessage(packet.content));
systemchat.nocolor_message = parseMinecraftMessageNoColor(processNbtMessage(packet.content));
bot.emit('Custom_SystemChat', systemchat.message, systemchat);
@ -107,7 +107,7 @@ bot.on('player_chat', (packet) => { // player
console.log(packet);
break;
}
bot.emit('custom_PlayerChat', msg, playerchat);
bot.emit('Custom_PlayerChat', msg, playerchat);
bot.emit('Custom_AllChat', msg, playerchat)
});