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: 'pig',
|
||
|
alias: [],
|
||
|
description: 'Summon pigs 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 pig`);
|
||
|
bot.core.run('minecraft:tellraw @a ' + JSON.stringify(['', {'text': 'Pigs ', 'color': 'white'}, {'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 pig');
|
||
|
bot.core.run('minecraft:tellraw @a ["",{"text":"Pigs ","color":"#FCA6A6"},{"text":"spawned at everyone","color":"white"}]');
|
||
|
}
|
||
|
},
|
||
|
};
|