Minecraft-protocol-1.20.4-c.../main/main.js

35 lines
824 B
JavaScript
Raw Normal View History

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