From 945b94f812b7869c4c57686f5990bcbba245c154 Mon Sep 17 00:00:00 2001 From: Yaode_owo Date: Sat, 7 Sep 2024 07:43:08 -0400 Subject: [PATCH] update --- main/main.js | 56 ++++++++++++++++++++++++++-------------------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/main/main.js b/main/main.js index 7633288..2a0f6ad 100644 --- a/main/main.js +++ b/main/main.js @@ -1,28 +1,28 @@ -const mc = require('minecraft-protocol'); -const inject = require("./emit.js"); - -const bot = mc.createClient({ - //host: 'chipmunk.land', - host: 'kaboom.pw', - port: 25565, - username: 'catparser', - version: "1.20.4", -}); - -inject(bot); - -bot.on('custom_playerChat', (msg) => { - console.log(`PlayerChat: ${msg}`); -}); - -bot.on('custom_systemChat', (msg, nocolormsg, cspy) => { // SystemChat maybe is PlayerChat use sudo or vanish - console.log(`SystemChat: ${msg}`); -}); - -bot.on('custom_commandspy', (cspy) => { - console.log(`CSPY: ${cspy.username}: /${cspy.command}`); -}) - -bot.on('error', (err) => { - console.error('Bot Error:', err); -}); +const mc = require('minecraft-protocol'); +const inject = require("./chatparser.js"); + +const bot = mc.createClient({ + //host: 'chipmunk.land', + host: 'kaboom.pw', + port: 25565, + username: 'catparser', // cat + version: "1.20.4", +}); + +inject(bot); // load + +bot.on('custom_playerChat', (msg, uuid, plainMessage, SenderName, TargetName, formattedMessage, unsignedContent, NoColorSenderName, NoColorTargetName, NoColorformattedMessage, NoColorunsignedContent, nocolorplayermsg, packet.type) => { + console.log(`PlayerChat: ${msg}`); +}); + +bot.on('custom_systemChat', (msg, nocolormsg, jsonmsg) => { // SystemChat maybe is PlayerChat use sudo or vanish + console.log(`SystemChat: ${msg}`); +}); + +bot.on('custom_Commandspy', (cspy) => { + console.log(`CSPY: ${cspy.username}: /${cspy.command}`); +}) + +bot.on('error', (err) => { + console.error('Bot Error:', err); +});