diff --git a/src/main/java/land/chipmunk/chipmunkbot/plugins/SongPlayer.java b/src/main/java/land/chipmunk/chipmunkbot/plugins/SongPlayer.java index 81f6fe8..1978201 100644 --- a/src/main/java/land/chipmunk/chipmunkbot/plugins/SongPlayer.java +++ b/src/main/java/land/chipmunk/chipmunkbot/plugins/SongPlayer.java @@ -20,6 +20,7 @@ import java.util.LinkedList; public class SongPlayer extends SessionAdapter { private final ChipmunkBot client; + public static final String SELECTOR = "@a[tag=!nomusic,tag=!chipmunkbot_nomusic]"; public static File SONG_DIR = new File("songs"); static { if (!SONG_DIR.exists()) { @@ -85,7 +86,7 @@ public class SongPlayer extends SessionAdapter { if (currentSong.paused && ticksUntilPausedActionbar-- < 0) return; else ticksUntilPausedActionbar = 20; - client.core().run("title @a actionbar " + GsonComponentSerializer.gson().serialize(generateActionbar())); + client.core().run("title " + SELECTOR + " actionbar " + GsonComponentSerializer.gson().serialize(generateActionbar())); if (currentSong.paused) return; @@ -164,7 +165,7 @@ public class SongPlayer extends SessionAdapter { final double floatingPitch = Math.pow(2, (note.pitch - 12) / 12.0); - client.core().run("execute as @a at @s run playsound " + note.instrument.sound + " record @s ~ ~ ~ " + note.volume + " " + floatingPitch); + client.core().run("execute as " + SELECTOR + " at @s run playsound " + note.instrument.sound + " record @s ~ ~ ~ " + note.volume + " " + floatingPitch); } } }