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() {
|
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();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue