Contents
Interface PlayerVoiceInterceptor
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Hook invoked for each inbound player voice frame, letting a plugin observe it, rewrite its relay metadata
or opaque Opus audio, decide who hears it, or drop it. Register with
VoiceModule.addPlayerVoiceInterceptor(PlayerVoiceInterceptor) and see PlayerVoiceFrame for the available controls.
Invoked on the voice executor, off the world thread, pinned per speaker so a speaker's frames stay
ordered. It must return promptly and must not block, sleep, do I/O, or take contended locks: many speakers
share one of four executor threads, so a slow interceptor stalls voice for a quarter of speakers. Use PlayerVoiceFrame.speaker only for identity and thread-safe lookups. A throwing interceptor is logged at
WARNING and the chain continues. Any changes it applied to the frame before throwing are kept, and
a throw cannot disable voice routing.
-
Method Summary
Modifier and TypeMethodDescriptionvoidintercept(PlayerVoiceFrame frame) Inspects and optionally altersframe.
-
Method Details
-
intercept
Inspects and optionally altersframe.
-