invalid username

This commit is contained in:
ChomeNS 2022-11-05 18:52:50 +07:00
parent ff03731af1
commit 6be3d40a89

View file

@ -10,7 +10,7 @@ module.exports = {
if (args[0]) {
const playername = args.join(' ');
const player = bot.playersAddedPlayers[playername];
if (player === undefined) throw new SyntaxError('Invalid UUID');
if (player === undefined) throw new SyntaxError('Invalid Username');
bot.core.run('minecraft:tellraw @a ' + JSON.stringify(['', {text: `${playername}'s uuid: `, color: 'green'}, {text: `${player}`, color: 'aqua', clickEvent: {action: 'copy_to_clipboard', value: `${player}`}, hoverEvent: {action: 'show_text', contents: [{text: 'Click here to copy the uuid to your clipboard', color: 'green'}]}}]));
} else {
bot.core.run('minecraft:tellraw @a ' + JSON.stringify(['', {text: `Your uuid: `, color: 'green'}, {text: `${sender}`, color: 'aqua', clickEvent: {action: 'copy_to_clipboard', value: `${sender}`}, hoverEvent: {action: 'show_text', contents: [{text: 'Click here to copy the uuid to your clipboard', color: 'green'}]}}]));