refactor: only tellraw to players without the nomusic tags

This commit is contained in:
ChomeNS
2025-03-17 14:14:53 +07:00
parent 164f097249
commit a0e32ad146
2 changed files with 7 additions and 4 deletions

View File

@@ -119,7 +119,8 @@ public class MusicPlayerPlugin extends Bot.Listener {
"Loading %s",
Component.text(songName, ColorUtilities.getColorByString(bot.config.colorPalette.secondary))
)
.color(ColorUtilities.getColorByString(bot.config.colorPalette.defaultColor))
.color(ColorUtilities.getColorByString(bot.config.colorPalette.defaultColor)),
BOTH_SELECTOR
);
this.loaderThread.start();
@@ -145,7 +146,8 @@ public class MusicPlayerPlugin extends Bot.Listener {
Component.translatable(
"Now playing %s",
Component.empty().append(Component.text(currentSong.name)).color(ColorUtilities.getColorByString(bot.config.colorPalette.secondary))
).color(ColorUtilities.getColorByString(bot.config.colorPalette.defaultColor))
).color(ColorUtilities.getColorByString(bot.config.colorPalette.defaultColor)),
BOTH_SELECTOR
);
currentSong.play();
}
@@ -181,7 +183,8 @@ public class MusicPlayerPlugin extends Bot.Listener {
Component.translatable(
"Finished playing %s",
Component.empty().append(Component.text(currentSong.name)).color(ColorUtilities.getColorByString(bot.config.colorPalette.secondary))
).color(ColorUtilities.getColorByString(bot.config.colorPalette.defaultColor))
).color(ColorUtilities.getColorByString(bot.config.colorPalette.defaultColor)),
BOTH_SELECTOR
);
if (loop == Loop.ALL) {