fix(informer): 🥅 fix crash for block info when no block or an empty block is found
This commit is contained in:
parent
67932b2f6a
commit
2601b7cfb1
|
@ -5,6 +5,10 @@ let mcData
|
|||
function block() {
|
||||
const block = bot.blockAtCursor()
|
||||
console.log(block)
|
||||
if (!block) {
|
||||
cfg.quiet || bot.chat("empty")
|
||||
return block
|
||||
}
|
||||
let info = [block.type, block.name]
|
||||
if (block.metadata) info.push(block.metadata)
|
||||
cfg.quiet || bot.chat(info.join(": "))
|
||||
|
|
Loading…
Reference in New Issue
Block a user