diff --git a/lib/plugins/informer.js b/lib/plugins/informer.js index cfb4768..675cdd7 100644 --- a/lib/plugins/informer.js +++ b/lib/plugins/informer.js @@ -10,11 +10,25 @@ function block() { cfg.quiet || bot.chat(info.join(": ")) } +function item( + // hand + loc = bot.quickBarSlot +) { + const item = bot.inventory.slots[loc + bot.QUICK_BAR_START] + console.log(item) + let info = [item.type, item.name] + if (item.metadata) info.push(item.metadata) + cfg.quiet || bot.chat(info.join(": ")) +} + function command(message_parts) { switch (message_parts.length) { case 0: case 1: switch (message_parts[0]) { + case "item": + item() + break case "block": default: block() @@ -39,4 +53,4 @@ const load = (config) => { const unload = () => {} -module.exports = { load, unload, command, block } \ No newline at end of file +module.exports = { load, unload, command, block, item } \ No newline at end of file