some more fixes

This commit is contained in:
Chayapak 2023-06-30 22:03:04 +07:00
parent df73a5ec7d
commit b4238ea016
2 changed files with 3 additions and 1 deletions

View file

@ -47,6 +47,8 @@ public class BossbarManagerPlugin extends Bot.Listener {
}
public void packetReceived(ClientboundBossEventPacket packet) {
if (!enabled || !bot.options().useCore()) return;
try {
switch (packet.getAction()) {
case ADD -> {

View file

@ -107,7 +107,7 @@ public class MusicPlayerPlugin extends Bot.Listener {
if (bossBar == null && bot.bossbar().enabled()) bossBar = addBossBar();
if (bot.bossbar().enabled()) {
if (bot.bossbar().enabled() && bot.options().useCore()) {
bossBar.setTitle(generateBossbar());
bossBar.setColor(pitch > 0 ? BossBarColor.PURPLE : BossBarColor.YELLOW);
bossBar.setValue((int) Math.floor(((double) currentSong.time / 1000) * speed));