Package net.kyori.adventure.sound
Interface SoundStop
- All Superinterfaces:
net.kyori.examination.Examinable
@NonExtendable
public interface SoundStop
extends net.kyori.examination.Examinable
A sound and/or a sound source, used for stopping in-game sounds that
are being played on a game client matching the given sound and/or sound source.
For clarification: a SoundStop
consisting of the sound "ambient.weather.rain" and the source Sound.Source.AMBIENT
will only stop sounds matching BOTH parameters and not sounds matching only the sound or only the source.
- Since:
- 4.0.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull SoundStop
all()
Stops all sounds.static @NotNull SoundStop
named
(@NotNull Supplier<? extends Sound.Type> sound) Stops all sounds namedsound
.static @NotNull SoundStop
Stops all sounds namedsound
.static @NotNull SoundStop
named
(@NotNull Sound.Type sound) Stops all sounds namedsound
.static @NotNull SoundStop
namedOnSource
(@NotNull Supplier<? extends Sound.Type> sound, @NotNull Sound.Source source) Stops all sounds namedname
on sourcesource
.static @NotNull SoundStop
namedOnSource
(@NotNull Key sound, @NotNull Sound.Source source) Stops all sounds namedname
on sourcesource
.static @NotNull SoundStop
namedOnSource
(@NotNull Sound.Type sound, @NotNull Sound.Source source) Stops all sounds namedname
on sourcesource
.@Nullable Key
sound()
Gets the sound.@Nullable Sound.Source
source()
Gets the source.static @NotNull SoundStop
source
(@NotNull Sound.Source source) Stops all sounds on sourcesource
.Methods inherited from interface net.kyori.examination.Examinable
examinableName, examinableProperties, examine
-
Method Details
-
all
Stops all sounds.- Returns:
- a sound stopper
- Since:
- 4.0.0
-
named
Stops all sounds namedsound
.- Parameters:
sound
- the sound- Returns:
- a sound stopper
- Since:
- 4.0.0
-
named
Stops all sounds namedsound
.- Parameters:
sound
- the sound- Returns:
- a sound stopper
- Since:
- 4.0.0
-
named
Stops all sounds namedsound
.- Parameters:
sound
- the sound- Returns:
- a sound stopper
- Since:
- 4.0.0
-
source
Stops all sounds on sourcesource
.- Parameters:
source
- the source- Returns:
- a sound stopper
- Since:
- 4.0.0
-
namedOnSource
@NotNull static @NotNull SoundStop namedOnSource(@NotNull @NotNull Key sound, @NotNull Sound.Source source) Stops all sounds namedname
on sourcesource
.- Parameters:
sound
- the soundsource
- the source- Returns:
- a sound stopper
- Since:
- 4.0.0
-
namedOnSource
@NotNull static @NotNull SoundStop namedOnSource(@NotNull Sound.Type sound, @NotNull Sound.Source source) Stops all sounds namedname
on sourcesource
.- Parameters:
sound
- the soundsource
- the source- Returns:
- a sound stopper
- Since:
- 4.0.0
-
namedOnSource
@NotNull static @NotNull SoundStop namedOnSource(@NotNull @NotNull Supplier<? extends Sound.Type> sound, @NotNull Sound.Source source) Stops all sounds namedname
on sourcesource
.- Parameters:
sound
- the soundsource
- the source- Returns:
- a sound stopper
- Since:
- 4.0.0
-
sound
Gets the sound.- Returns:
- the sound
- Since:
- 4.0.0
-
source
@Nullable Sound.Source source()Gets the source.- Returns:
- the source
- Since:
- 4.0.0
-