UNPKG

nodemc_alts

Version:

Connect to thealtening and easymc alts using node minecraft protocol!

26 lines (18 loc) 619 B
var flayer = require('mineflayer'); var mc = require('minecraft-protocol'); const nodealt = require('./alts-nodemc'); const alt = new nodealt.mineflayer(); //const alt = new nodealt(); //const alt = new nodealt.nodeprotocol(); var bot = alt.fastalts("Removed" /* required */,"mc.minehut.com" /* required */ ); bot.on('connect', function() { console.log("connected pog"); }); bot.on('chat', (username, message) => { if (username === bot.username) return //bot.chat(message) console.log(username+" : "+message); }) // Log errors and kick reasons: bot.on('kicked', console.log) bot.on('error', console.log)