/* eslint-disable max-len */ module.exports = { name: 'pig', alias: [], description: 'Summon pigs at everyone', usage: '[specific] ', 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"}]'); } }, };