Package be.seeseemelk.mockbukkit.sound
Class AudioExperience
java.lang.Object
be.seeseemelk.mockbukkit.sound.AudioExperience
This class represents a
Sound that was heard by a Player.-
Constructor Summary
ConstructorsConstructorDescriptionAudioExperience(@NotNull String sound, @NotNull org.bukkit.SoundCategory category, @NotNull org.bukkit.Location loc, float volume, float pitch) Constructs a newAudioExperiencewith the provided parameters.AudioExperience(@NotNull net.kyori.adventure.sound.Sound sound, @NotNull org.bukkit.Location loc) Constructs a newAudioExperiencewith 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 newAudioExperiencewith the provided parameters. -
Method Summary
Modifier and TypeMethodDescription@NotNull org.bukkit.SoundCategoryThis method returns theSoundCategorywith which theSoundwas played.@NotNull org.bukkit.LocationThis returns theLocationat which thisSoundwas played.floatgetPitch()The pitch of thisSound@NotNull StringgetSound()This returns theSoundthat was played.@NotNull net.kyori.adventure.sound.Sound.SourceThis method returns theSound.Sourcewith which theSoundwas played.floatThe volume of thisSound
-
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 newAudioExperiencewith 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 newAudioExperiencewith 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 newAudioExperiencewith the provided sound and location.- Parameters:
sound- The sound name that was heard.loc- The location the sound was played at.
-
-
Method Details
-
getSound
This returns theSoundthat was played. We return theStringrepresentation of the actual sound, not the sound itself.- Returns:
- The
Stringof the heardSound.
-
getCategory
@NotNull public @NotNull org.bukkit.SoundCategory getCategory()This method returns theSoundCategorywith which theSoundwas played.- Returns:
- The
SoundCategory
-
getSource
public @NotNull net.kyori.adventure.sound.Sound.Source getSource()This method returns theSound.Sourcewith which theSoundwas played.- Returns:
- The
Sound.Source
-
getLocation
@NotNull public @NotNull org.bukkit.Location getLocation()This returns theLocationat which thisSoundwas played.- Returns:
- The
Location
-
getVolume
public float getVolume()The volume of thisSound- Returns:
- The volume
-
getPitch
public float getPitch()The pitch of thisSound- Returns:
- The pitch
-