mirror of
https://github.com/ChomeNS/chomens-bot-mc.git
synced 2024-11-14 18:54:55 -05:00
*music list suggest_command clickEvent
This commit is contained in:
parent
0786d6c801
commit
48daabc64e
1 changed files with 8 additions and 8 deletions
|
@ -61,19 +61,19 @@ module.exports = {
|
||||||
const absolutePath = await resolve(SONGS_PATH);
|
const absolutePath = await resolve(SONGS_PATH);
|
||||||
const listed = await list(absolutePath);
|
const listed = await list(absolutePath);
|
||||||
|
|
||||||
let color = '§6';
|
let color = 'gold';
|
||||||
let message = '';
|
const message = [];
|
||||||
|
|
||||||
listed.forEach((value) => {
|
listed.forEach((value) => {
|
||||||
if (color==='§6') {
|
if (color==='gold') {
|
||||||
color = '§e';
|
color = 'yellow';
|
||||||
} else if (color==='§e') {
|
} else if (color==='yellow') {
|
||||||
color = '§6';
|
color = 'gold';
|
||||||
};
|
};
|
||||||
message += color + value + ' ';
|
message.push({text: value + ' ', color, clickEvent: {action: 'suggest_command', value: `*music play ${value}`}});
|
||||||
});
|
});
|
||||||
|
|
||||||
bot.core.run('minecraft:tellraw @a ' + JSON.stringify({text: message, color: 'red'}));
|
bot.core.run('minecraft:tellraw @a ' + JSON.stringify(message));
|
||||||
};
|
};
|
||||||
|
|
||||||
if (args[0]==='play') {
|
if (args[0]==='play') {
|
||||||
|
|
Loading…
Reference in a new issue