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