Interface ClientReceiveSoundEvent
- All Superinterfaces:
ClientEvent, Event
- All Known Subinterfaces:
ClientReceiveSoundEvent.EntitySound, ClientReceiveSoundEvent.LocationalSound, ClientReceiveSoundEvent.StaticSound
This event is emitted before the sound is played on the client.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfacestatic interfacestatic interface -
Method Summary
Modifier and TypeMethodDescriptiongetId()short[]The unencoded audio data.voidsetRawAudio(short[] rawAudio) Overrides the actual audio data that is played.Methods inherited from interface ClientEvent
getVoicechatMethods inherited from interface Event
cancel, isCancellable, isCancelled
-
Method Details
-
getId
UUID getId()- Returns:
- the ID of the sender
-
getRawAudio
short[] getRawAudio()The unencoded audio data.
Returns an empty array in case of the end of transmission- Returns:
- the raw 16 bit PCM audio frame
-
setRawAudio
void setRawAudio(@Nullable short[] rawAudio) Overrides the actual audio data that is played.This is ignored, if the
getRawAudio()array is empty- Parameters:
rawAudio- the raw 16 bit PCM audio frame
-