diff --git a/lib/plugins/command.js b/lib/plugins/command.js index aeffc24..c013ffd 100644 --- a/lib/plugins/command.js +++ b/lib/plugins/command.js @@ -396,6 +396,9 @@ function command(username, message) { break } break + case "info": + cfg.plugins.informer.command(message_parts.splice(1)) + break case "ride": case "mount": bot.mount(bot.nearestEntity()) diff --git a/lib/plugins/informer.js b/lib/plugins/informer.js index 9815e8a..cfb4768 100644 --- a/lib/plugins/informer.js +++ b/lib/plugins/informer.js @@ -10,6 +10,24 @@ function block() { cfg.quiet || bot.chat(info.join(": ")) } +function command(message_parts) { + switch (message_parts.length) { + case 0: + case 1: + switch (message_parts[0]) { + case "block": + default: + block() + break; + } + + break; + + default: + break; + } +} + const load = (config) => { cfg = config bot = cfg.bot @@ -21,4 +39,4 @@ const load = (config) => { const unload = () => {} -module.exports = { load, unload, block } \ No newline at end of file +module.exports = { load, unload, command, block } \ No newline at end of file