Interface PlaySoundEvent

All Superinterfaces:
Cancellable, Event
All Known Subinterfaces:
PlaySoundEvent.AtEntity, PlaySoundEvent.Broadcast, PlaySoundEvent.NoteBlock, PlaySoundEvent.Record, PlaySoundEvent.Record.Start, PlaySoundEvent.Record.Stop

public interface PlaySoundEvent extends Event, Cancellable
An umbrella event that fires when in-game sounds, such as records in jukeboxes or sounds when boss entities die.
  • Method Details

    • location

      ServerLocation location()
      Gets the location of the sound being played.
      Returns:
      the location of the sound being played
    • soundType

      SoundType soundType()
      Gets the SoundType for the sound being played.
      Returns:
      The SoundType
    • soundSource

      Sound.Source soundSource()
      Gets the Sound.Source for the sound being played.
      Returns:
      The Sound.Source
    • volume

      float volume()
      Gets the volume of the sound being played.
      Returns:
      A float that represents the relative volume. This value may be positive value.
    • pitch

      float pitch()
      Gets the pitch of the sound being played
      Returns:
      A float that represents the pitch.