const mc = require('minecraft-protocol'); const ChatParse = require("./chatparser.js"); const bot = mc.createClient({ // host: '95.216.192.50', // kaboom // host: 'chipmunk.land', // host: '168.100.225.224', // Neko port: 25565, username: 'catparser', // cat version: "1.20.4", }); ChatParse.inject(bot); // load chatparser function bot.on('custom_PlayerChat', (message, playerchat) => { console.log(`PlayerChat: ${message}`); }); bot.on('Custom_SystemChat', (message, systemchat) => { console.log(`SystemChat: ${message}`); }); bot.on('Custom_ProfilelessChat', (message, profilelesschat) => { console.log(`ProfilelessChat: ${message}`) }) /* bot.on('Custom_AllChat', (message, chat) => { console.log(`AllChat: ${message}`) }) */ bot.on('error', (err) => { console.error('Bot Error:', err); });