A high-level, general purpose and modular minecraft bot using hot re-loadable (without restarting the bot!) plugins. Batteries included, launch to run!
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

24 lines
504 B

let cfg
let bot
let mcData
function block() {
const block = bot.blockAtCursor()
console.log(block)
let info = [block.type, block.name]
if (block.metadata) info.push(block.metadata)
cfg.quiet || bot.chat(info.join(": "))
}
const load = (config) => {
cfg = config
bot = cfg.bot
cfg.info = {
quiet: cfg.quiet,
}
mcData = bot.mcData || (bot.mcData = require('minecraft-data')(bot.version))
}
const unload = () => {}
module.exports = { load, unload, block }