Update main/chatparser.js
This commit is contained in:
parent
3d25099f44
commit
988048783d
1 changed files with 6 additions and 3 deletions
|
@ -29,12 +29,15 @@ function processNbtMessage(msg) {
|
|||
return '{"text":""}';
|
||||
}
|
||||
}
|
||||
let profilelesschat = {};
|
||||
let systemchat = {};
|
||||
let playerchat = {};
|
||||
|
||||
function inject(bot) {
|
||||
|
||||
bot.on('system_chat', (packet) => { // system
|
||||
if (packet.isActionBar) return;
|
||||
let systemchat = {};
|
||||
systemchat = {};
|
||||
systemchat.jsonMsg = JSON.parse(processNbtMessage(packet.content));
|
||||
systemchat.message = parseMinecraftMessage(processNbtMessage(packet.content));
|
||||
systemchat.nocolor_message = parseMinecraftMessageNoColor(processNbtMessage(packet.content));
|
||||
|
@ -44,7 +47,7 @@ bot.on('system_chat', (packet) => { // system
|
|||
|
||||
|
||||
bot.on('profileless_chat', (packet) => { // sudo and vanish
|
||||
let profilelesschat = {};
|
||||
profilelesschat = {};
|
||||
|
||||
profilelesschat.type = packet.type
|
||||
|
||||
|
@ -61,7 +64,7 @@ bot.on('profileless_chat', (packet) => { // sudo and vanish
|
|||
})
|
||||
|
||||
bot.on('player_chat', (packet) => { // player
|
||||
let playerchat = {};
|
||||
playerchat = {};
|
||||
|
||||
playerchat.plainMessage = packet.plainMessage;
|
||||
playerchat.type = packet.type;
|
||||
|
|
Loading…
Reference in a new issue