2024-07-23 23:44:00 -04:00
|
|
|
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}`);
|
|
|
|
});
|
|
|
|
|
2024-07-24 12:50:18 -04:00
|
|
|
bot.on('custom_systemChat', (msg, nocolormsg, cspy) => { // SystemChat maybe is PlayerChat use sudo or vanish
|
2024-07-23 23:44:00 -04:00
|
|
|
console.log(`SystemChat: ${msg}`);
|
|
|
|
});
|
|
|
|
|
2024-07-24 12:50:18 -04:00
|
|
|
bot.on('custom_commandspy', (cspy) => {
|
|
|
|
console.log(`CSPY: ${cspy.username}: /${cspy.command}`);
|
|
|
|
})
|
|
|
|
|
2024-07-23 23:44:00 -04:00
|
|
|
bot.on('error', (err) => {
|
|
|
|
console.error('Bot Error:', err);
|
|
|
|
});
|