Minecraft-protocol-1.20.4-c.../main/main.js
2024-07-23 23:44:00 -04:00

24 lines
545 B
JavaScript

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) => { // SystemChat maybe is PlayerChat use sudo or vanish
console.log(`SystemChat: ${msg}`);
});
bot.on('error', (err) => {
console.error('Bot Error:', err);
});