angram/lib/plugins/informer.js

24 lines
504 B
JavaScript

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 }