forked from ChomeNS/chomens-bot-java
try catch it
This commit is contained in:
parent
744381ca06
commit
c2894c64d2
1 changed files with 65 additions and 61 deletions
|
@ -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();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue