diff --git a/plugins/music.js b/plugins/music.js index ce98961..f2aa2c2 100644 --- a/plugins/music.js +++ b/plugins/music.js @@ -57,14 +57,16 @@ function inject(bot) { return; } bot.music.queue.shift(); - if (!bot.music.queue[0]) return; + if (!bot.music.queue[0]) { + bot.core.run('minecraft:tellraw @a ' + JSON.stringify({text: 'Finished playing every song in the queue'})); + bot.music.stop(); + return; + } if (bot.music.queue[0].notes.length > 0) { if (bot.music.queue.length !== 1) resetTime(); bot.music.play(bot.music.queue[0]); return; } - bot.core.run('minecraft:tellraw @a ' + JSON.stringify({text: 'Finished playing every song in the queue'})); - bot.music.stop(); } } } catch (e) {