feat(informer): ✨ info about held item(s)
This commit is contained in:
parent
4d21327086
commit
3488a94233
|
@ -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 }
|
||||
module.exports = { load, unload, command, block, item }
|
Loading…
Reference in New Issue
Block a user