Interface PlaySoundEvent
- All Superinterfaces:
- Cancellable,- Event
- All Known Subinterfaces:
- PlaySoundEvent.AtEntity,- PlaySoundEvent.Broadcast,- PlaySoundEvent.FromJukebox,- PlaySoundEvent.FromJukebox.Start,- PlaySoundEvent.FromJukebox.Stop,- PlaySoundEvent.NoteBlock
An umbrella event that fires when in-game sounds, such as
 records in jukeboxes or sounds when boss entities die.
- 
Nested Class SummaryNested ClassesModifier and TypeInterfaceDescriptionstatic interfaceFired when a sound is played at a specificEntitystatic interfacestatic interfaceFired when a record is inserted into a Jukeboxstatic interfaceFired when a noteblock is triggered
- 
Method SummaryModifier and TypeMethodDescriptionlocation()Gets the location of the sound being played.floatpitch()Gets the pitch of the sound being playedGets theSound.Sourcefor the sound being played.Gets theSoundTypefor the sound being played.floatvolume()Gets the volume of the sound being played.Methods inherited from interface org.spongepowered.api.event.CancellableisCancelled, setCancelled
- 
Method Details- 
locationServerLocation location()Gets the location of the sound being played.- Returns:
- the location of the sound being played
 
- 
soundTypeSoundType soundType()Gets theSoundTypefor the sound being played.- Returns:
- The SoundType
 
- 
soundSourceSound.Source soundSource()Gets theSound.Sourcefor the sound being played.- Returns:
- The Sound.Source
 
- 
volumefloat volume()Gets the volume of the sound being played.- Returns:
- A float that represents the relative volume. This value may be positive value.
 
- 
pitchfloat pitch()Gets the pitch of the sound being played- Returns:
- A float that represents the pitch.
 
 
-