Package net.kyori.adventure.sound
Interface SoundStop
-
- All Superinterfaces:
net.kyori.examination.Examinable
@NonExtendable public interface SoundStop extends net.kyori.examination.ExaminableA 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
SoundStopconsisting of the sound "ambient.weather.rain" and the sourceSound.Source.AMBIENTwill only stop sounds matching BOTH parameters and not sounds matching only the sound or only the source.- Since:
- 4.0.0
- See Also:
Audience.stopSound(SoundStop)
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static @NonNull SoundStopall()Stops all sounds.static @NonNull SoundStopnamed(@NonNull Supplier<? extends Sound.Type> sound)Stops all sounds namedsound.static @NonNull SoundStopnamed(@NonNull net.kyori.adventure.key.Key sound)Stops all sounds namedsound.static @NonNull SoundStopnamed(@NonNull Sound.Type sound)Stops all sounds namedsound.static @NonNull SoundStopnamedOnSource(@NonNull Supplier<? extends Sound.Type> sound, @NonNull Sound.Source source)Stops all sounds namednameon sourcesource.static @NonNull SoundStopnamedOnSource(@NonNull net.kyori.adventure.key.Key sound, @NonNull Sound.Source source)Stops all sounds namednameon sourcesource.static @NonNull SoundStopnamedOnSource(@NonNull Sound.Type sound, @NonNull Sound.Source source)Stops all sounds namednameon sourcesource.@Nullable net.kyori.adventure.key.Keysound()Gets the sound.@Nullable Sound.Sourcesource()Gets the source.static @NonNull SoundStopsource(@NonNull Sound.Source source)Stops all sounds on sourcesource.
-
-
-
Method Detail
-
all
static @NonNull SoundStop all()
Stops all sounds.- Returns:
- a sound stopper
- Since:
- 4.0.0
-
named
static @NonNull SoundStop named(@NonNull net.kyori.adventure.key.Key sound)
Stops all sounds namedsound.- Parameters:
sound- the sound- Returns:
- a sound stopper
- Since:
- 4.0.0
-
named
static @NonNull SoundStop named(@NonNull Sound.Type sound)
Stops all sounds namedsound.- Parameters:
sound- the sound- Returns:
- a sound stopper
- Since:
- 4.0.0
-
named
static @NonNull SoundStop named(@NonNull Supplier<? extends Sound.Type> sound)
Stops all sounds namedsound.- Parameters:
sound- the sound- Returns:
- a sound stopper
- Since:
- 4.0.0
-
source
static @NonNull SoundStop source(@NonNull Sound.Source source)
Stops all sounds on sourcesource.- Parameters:
source- the source- Returns:
- a sound stopper
- Since:
- 4.0.0
-
namedOnSource
static @NonNull SoundStop namedOnSource(@NonNull net.kyori.adventure.key.Key sound, @NonNull Sound.Source source)
Stops all sounds namednameon sourcesource.- Parameters:
sound- the soundsource- the source- Returns:
- a sound stopper
- Since:
- 4.0.0
-
namedOnSource
static @NonNull SoundStop namedOnSource(@NonNull Sound.Type sound, @NonNull Sound.Source source)
Stops all sounds namednameon sourcesource.- Parameters:
sound- the soundsource- the source- Returns:
- a sound stopper
- Since:
- 4.0.0
-
namedOnSource
static @NonNull SoundStop namedOnSource(@NonNull Supplier<? extends Sound.Type> sound, @NonNull Sound.Source source)
Stops all sounds namednameon sourcesource.- Parameters:
sound- the soundsource- the source- Returns:
- a sound stopper
- Since:
- 4.0.0
-
sound
@Nullable net.kyori.adventure.key.Key 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
-
-