fix: don't send muted player messages to discord

This commit is contained in:
Draycia committed 2025-01-16 00:42:37 -08:00
1 parent 84fd5b67cd
commit cf54cb69d6
1 file changed
+5 -1
@@ -79,6 +79,10 @@ public final class DSRVListener implements ChatHook {
return; return;
} }
if (carbonPlayer.muted()) {
return;
}
final ImmutablePair<CarbonPlayer, ChatChannel> pair = new ImmutablePair<>(carbonPlayer, chatChannel); final ImmutablePair<CarbonPlayer, ChatChannel> pair = new ImmutablePair<>(carbonPlayer, chatChannel);
Component messageComponent = awaitingEvent.getIfPresent(pair); Component messageComponent = awaitingEvent.getIfPresent(pair);
awaitingEvent.invalidate(pair); awaitingEvent.invalidate(pair);
@@ -142,7 +146,7 @@ public final class DSRVListener implements ChatHook {
@Override @Override
public Plugin getPlugin() { public Plugin getPlugin() {
return null; return this.plugin;
} }
} }