Class AudioExperience

java.lang.Object
be.seeseemelk.mockbukkit.sound.AudioExperience

public final class AudioExperience extends Object
This class represents a Sound that was heard by a Player.
  • Constructor Details

    • AudioExperience

      @Internal public AudioExperience(@NotNull @NotNull String sound, @NotNull @NotNull SoundCategory category, @NotNull @NotNull Location loc, float volume, float pitch)
      Constructs a new AudioExperience with the provided parameters.
      Parameters:
      sound - The sound name that was heard.
      category - The category of the sound.
      loc - The location the sound was played at.
      volume - The volume of the sound.
      pitch - The pitch of the sound.
    • AudioExperience

      @Internal public AudioExperience(@NotNull @NotNull Sound sound, @NotNull @NotNull SoundCategory category, @NotNull @NotNull Location loc, float volume, float pitch)
      Constructs a new AudioExperience with the provided parameters.
      Parameters:
      sound - The sound name that was heard.
      category - The category of the sound.
      loc - The location the sound was played at.
      volume - The volume of the sound.
      pitch - The pitch of the sound.
    • AudioExperience

      @Internal public AudioExperience(@NotNull net.kyori.adventure.sound.Sound sound, @NotNull @NotNull Location loc)
      Constructs a new AudioExperience with the provided sound and location.
      Parameters:
      sound - The sound name that was heard.
      loc - The location the sound was played at.
  • Method Details

    • getSound

      @NotNull public @NotNull String getSound()
      This returns the Sound that was played. We return the String representation of the actual sound, not the sound itself.
      Returns:
      The String of the heard Sound.
    • getCategory

      @NotNull public @NotNull SoundCategory getCategory()
      This method returns the SoundCategory with which the Sound was played.
      Returns:
      The SoundCategory
    • getSource

      public @NotNull net.kyori.adventure.sound.Sound.Source getSource()
      This method returns the Sound.Source with which the Sound was played.
      Returns:
      The Sound.Source
    • getLocation

      @NotNull public @NotNull Location getLocation()
      This returns the Location at which this Sound was played.
      Returns:
      The Location
    • getVolume

      public float getVolume()
      The volume of this Sound
      Returns:
      The volume
    • getPitch

      public float getPitch()
      The pitch of this Sound
      Returns:
      The pitch