From db551dc70434825b5c36b068d667f900de4fa64d Mon Sep 17 00:00:00 2001 From: ChomeNS Date: Wed, 19 Oct 2022 10:02:57 +0700 Subject: [PATCH] *music list hoverEvent --- commands/music.js | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/commands/music.js b/commands/music.js index a5026c5..02fe908 100644 --- a/commands/music.js +++ b/commands/music.js @@ -70,7 +70,21 @@ module.exports = { } else if (color==='yellow') { color = 'gold'; }; - message.push({text: value + ' ', color, clickEvent: {action: 'suggest_command', value: `*music play ${value}`}}); + message.push({text: value + ' ', + color, + clickEvent: { + action: 'suggest_command', + value: `*music play ${value}`, + }, + hoverEvent: { + action: 'show_text', + contents: [ + {text: 'Name: ', color: 'white'}, + {text: value, color: 'gold'}, + '\n', + {text: 'Click here to suggest the command!', color: 'green'}, + ], + }}); }); bot.core.run('minecraft:tellraw @a ' + JSON.stringify(message));