try catch it

This commit is contained in:
Chayapak 2023-07-01 09:34:31 +07:00
parent 744381ca06
commit c2894c64d2

View file

@ -85,6 +85,7 @@ public class MusicPlayerPlugin extends Bot.Listener {
bot.tick().addListener(new TickPlugin.Listener() {
@Override
public void onTick() {
try {
if (currentSong == null) {
if (songQueue.size() == 0) return; // this line
@ -153,6 +154,9 @@ public class MusicPlayerPlugin extends Bot.Listener {
currentSong.play();
}
}
} catch (Exception e) {
e.printStackTrace();
}
}
});