16 lines
578 B
JavaScript
16 lines
578 B
JavaScript
const name = 'hole'
|
|
const description = 'Hole.'
|
|
const usage = '{prefix}hole <selector>'
|
|
const aliases = ['hole']
|
|
const enabled = true
|
|
|
|
const permLevel = 0
|
|
|
|
function execute (bot, cmd, entity, args, handler) {
|
|
let selector = args.join(' ')
|
|
if (selector.includes(' ') && !selector.startsWith('@')) { selector = `@a[name="${selector.replace(/"/, '\\"')}"]` }
|
|
|
|
bot.core.run(`/execute at ${selector} run setblock ~ 1 ~ command_block{Command:'fill ~-1 0 ~-1 ~1 255 ~1 air destroy',auto:1}`)
|
|
}
|
|
|
|
module.exports = { name, description, usage, aliases, enabled, execute, permLevel }
|