mirror of
https://github.com/ChomeNS/chomens-bot-mc.git
synced 2024-12-18 03:12:23 -05:00
15 lines
688 B
JavaScript
15 lines
688 B
JavaScript
|
/* eslint-disable max-len */
|
||
|
const {between} = require('../util/between');
|
||
|
module.exports = {
|
||
|
name: 'rtp',
|
||
|
alias: [],
|
||
|
description: 'Randomly teleports the player',
|
||
|
usage: '',
|
||
|
trusted: 0,
|
||
|
execute: function(bot, username, usernameraw, sender, prefix, args) {
|
||
|
const rtppos = `${between(20000000, 500000)} 100 ${between(20000000, 500000)}`;
|
||
|
bot.core.run('minecraft:tellraw @a ' + JSON.stringify([{text: 'Teleporting ', color: 'white'}, {text: username, color: 'aqua'}, {text: ' to ', color: 'white'}, {text: rtppos, color: 'green'}, {text: '...', color: 'white'}]));
|
||
|
bot.core.run(`minecraft:execute unless entity @s[name= run ] run tp ${username} ${rtppos}`);
|
||
|
},
|
||
|
};
|