mirror of
https://github.com/ChomeNS/chomens-bot-mc.git
synced 2024-11-14 18:54:55 -05:00
19 lines
864 B
JavaScript
19 lines
864 B
JavaScript
|
/* eslint-disable max-len */
|
||
|
module.exports = {
|
||
|
name: 'cow',
|
||
|
alias: [],
|
||
|
description: 'Summon cows at everyone',
|
||
|
usage: '[specific] <player>',
|
||
|
trusted: 0,
|
||
|
execute: function(bot, username, usernameraw, sender, prefix, args) {
|
||
|
if (args[0]==='specific') {
|
||
|
const specific = args[1];
|
||
|
bot.core.run(`minecraft:execute unless entity @s[name= run ] run execute as @a at ${specific} run summon cow`);
|
||
|
bot.core.run('minecraft:tellraw @a ' + JSON.stringify(['', {'text': 'Cows ', 'color': '#FCA6A6'}, {'text': 'spawning at ' + `${specific}`, 'color': 'white'}]));
|
||
|
} else {
|
||
|
bot.core.run('minecraft:execute unless entity @s[name= run ] run execute as @a at @r[\'limit\'=10] run summon cow');
|
||
|
bot.core.run('minecraft:tellraw @a ["",{"text":"Cows ","color":"white"},{"text":"spawned at everyone","color":"white"}]');
|
||
|
}
|
||
|
},
|
||
|
};
|