make bossbars show that it is not active when disabled
This commit is contained in:
parent
d43ef39b08
commit
6a7c0d69fd
2 changed files with 11 additions and 0 deletions
|
@ -288,6 +288,10 @@ public class MusicPlayerPlugin extends Bot.Listener {
|
|||
}
|
||||
|
||||
public void removeBossBar() {
|
||||
final BotBossBar bossBar = bot.bossbar.get(bossbarName);
|
||||
|
||||
if (bossBar != null) bossBar.setTitle(Component.text("No song is currently playing"));
|
||||
|
||||
bot.bossbar.remove(bossbarName);
|
||||
}
|
||||
|
||||
|
@ -372,6 +376,8 @@ public class MusicPlayerPlugin extends Bot.Listener {
|
|||
}
|
||||
|
||||
public void handlePlaying () {
|
||||
if (currentSong == null) return;
|
||||
|
||||
try {
|
||||
currentSong.advanceTime();
|
||||
while (currentSong.reachedNextNote()) {
|
||||
|
|
|
@ -66,6 +66,11 @@ public class TPSPlugin extends Bot.Listener {
|
|||
|
||||
public void off () {
|
||||
enabled = false;
|
||||
|
||||
final BotBossBar bossBar = bot.bossbar.get(bossbarName);
|
||||
|
||||
if (bossBar != null) bossBar.setTitle(Component.text("TPSBar is currently disabled"));
|
||||
|
||||
bot.bossbar.remove(bossbarName);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue