19 lines
688 B
JavaScript
19 lines
688 B
JavaScript
|
const name = 'randomteleport'
|
||
|
const description = 'Teleports you to a random location.'
|
||
|
const usage = '{prefix}randomteleport'
|
||
|
const aliases = ['randomteleport', 'randomtele', 'randomtp', 'rtp']
|
||
|
const enabled = true
|
||
|
|
||
|
const permLevel = 0
|
||
|
|
||
|
function execute (bot, cmd, player, args, handler) {
|
||
|
bot.core.run(`/essentials:sudo ${player.UUID} c:/tppos ${randomInt(-30000000, 30000000)} 256 ${randomInt(-30000000, 30000000)}`)
|
||
|
// setTimeout(() => bot.core.run(`/essentials:sudo ${player.UUID} c:/top`), 100)
|
||
|
}
|
||
|
|
||
|
function randomInt (min, max) {
|
||
|
return Math.floor((Math.random() * (max - min) + min) + 1)
|
||
|
}
|
||
|
|
||
|
module.exports = { name, description, usage, aliases, enabled, execute, permLevel }
|