Some stuff

This commit is contained in:
GregTCLTK 2020-01-06 21:11:01 +01:00
parent 93d5acda5d
commit 8b855b2676
No known key found for this signature in database
GPG key ID: A91BADE5C070FF67

View file

@ -49,9 +49,10 @@ public class TrackManager extends AudioEventAdapter {
@Override
public void onTrackEnd(AudioPlayer player, AudioTrack track, AudioTrackEndReason endReason) {
this.lastTrack = track;
Guild g = queue.poll().getAuthor().getGuild();
if (loop) {
player.startTrack(lastTrack.makeClone(), false);
player.playTrack(lastTrack.makeClone());
} else if (queue.isEmpty()) {
g.getAudioManager().closeAudioConnection();
} else {