Yaode_owo
130f4f4e62
remove commandspy fix give command block rewrite translate code use processNbtMessage(), not that already have profileless_chat All_Chat
34 lines
824 B
JavaScript
34 lines
824 B
JavaScript
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);
|
|
});
|