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 Summary

    Constructors
    Constructor
    Description
    AudioExperience(@NotNull String sound, @NotNull org.bukkit.SoundCategory category, @NotNull org.bukkit.Location loc, float volume, float pitch)
    Constructs a new AudioExperience with the provided parameters.
    AudioExperience(@NotNull net.kyori.adventure.sound.Sound sound, @NotNull org.bukkit.Location loc)
    Constructs a new AudioExperience with the provided sound and location.
    AudioExperience(@NotNull org.bukkit.Sound sound, @NotNull org.bukkit.SoundCategory category, @NotNull org.bukkit.Location loc, float volume, float pitch)
    Constructs a new AudioExperience with the provided parameters.
  • Method Summary

    Modifier and Type
    Method
    Description
    @NotNull org.bukkit.SoundCategory
    This method returns the SoundCategory with which the Sound was played.
    @NotNull org.bukkit.Location
    This returns the Location at which this Sound was played.
    float
    The pitch of this Sound
    @NotNull String
    This returns the Sound that was played.
    @NotNull net.kyori.adventure.sound.Sound.Source
    This method returns the Sound.Source with which the Sound was played.
    float
    The volume of this Sound

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • AudioExperience

      @Internal public AudioExperience(@NotNull @NotNull String sound, @NotNull @NotNull org.bukkit.SoundCategory category, @NotNull @NotNull org.bukkit.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 org.bukkit.Sound sound, @NotNull @NotNull org.bukkit.SoundCategory category, @NotNull @NotNull org.bukkit.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 org.bukkit.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 org.bukkit.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 org.bukkit.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