can now go to last using previous and being at the first song

This commit is contained in:
michiel
2025-10-28 10:53:02 +01:00
parent 0638a38fc1
commit 188a5e8a45

View File

@@ -175,7 +175,9 @@ public class MusicManager<T extends AudioResource> implements org.toop.framework
public void previous() {
if (backgroundMusic.isEmpty()) return;
if (playingIndex == 0) return;
if (playingIndex == 0) {
playingIndex = backgroundMusic.size();
}
stop();
scheduler.shutdownNow();
playingIndex = playingIndex - 1;