fix: music player using the global ticker instead of the local one

This commit is contained in:
ChomeNS
2025-04-17 19:15:07 +07:00
parent 56e3aba21a
commit 0bd20d2163
2 changed files with 3 additions and 4 deletions

View File

@@ -79,7 +79,7 @@ public class MusicPlayerPlugin implements Listener {
bot.listener.addListener(this);
bot.executor.scheduleAtFixedRate(this::onTick, 0, 50, TimeUnit.MILLISECONDS);
bot.executor.scheduleAtFixedRate(this::onMusicTick, 0, 50, TimeUnit.MILLISECONDS);
bot.executor.scheduleAtFixedRate(() -> urlLimit = 0, 0, bot.config.music.urlRatelimit.seconds, TimeUnit.SECONDS);
}
@@ -136,8 +136,7 @@ public class MusicPlayerPlugin implements Listener {
// this needs a separate ticker because we need
// the song to be playing without lag
@Override
public void onTick () {
private void onMusicTick () {
try {
if (!bot.loggedIn) return;