Data and information plugin. Expose methods in mcData with acceptable ux. Also central place for all kinds of debug features.cover
parent
94574a4296
commit
288b7045b6
2 changed files with 23 additions and 0 deletions
@ -0,0 +1,22 @@ |
||||
let cfg |
||||
let bot |
||||
let mcData |
||||
|
||||
function info() { |
||||
const block = bot.blockAtCursor() |
||||
console.log(block) |
||||
cfg.quiet || bot.chat([block.id, block.name]) |
||||
} |
||||
|
||||
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, info } |
Loading…
Reference in new issue