fix error currentSong.name is null or whatever shit that was

This commit is contained in:
Chayapak 2023-08-27 07:34:45 +07:00
parent f75f76b9d4
commit cc08c76020

View file

@ -126,6 +126,7 @@ public class MusicPlayerPlugin extends Bot.Listener {
if (currentSong.paused && ticksUntilPausedBossbar-- < 0) return; if (currentSong.paused && ticksUntilPausedBossbar-- < 0) return;
else ticksUntilPausedBossbar = 20 - (((int) bot.tps.getTickRate()) - 20); else ticksUntilPausedBossbar = 20 - (((int) bot.tps.getTickRate()) - 20);
if (!currentSong.finished()) {
BotBossBar bossBar = bot.bossbar.get(bossbarName); BotBossBar bossBar = bot.bossbar.get(bossbarName);
if (bossBar == null && bot.bossbar.enabled) bossBar = addBossBar(); if (bossBar == null && bot.bossbar.enabled) bossBar = addBossBar();
@ -140,8 +141,7 @@ public class MusicPlayerPlugin extends Bot.Listener {
if (currentSong.paused || bot.core.isRateLimited()) return; if (currentSong.paused || bot.core.isRateLimited()) return;
handlePlaying(); handlePlaying();
} else {
if (currentSong.finished()) {
if (loop == Loop.CURRENT) { if (loop == Loop.CURRENT) {
currentSong.loop(); currentSong.loop();
return; return;