public static interface SoundEvent.Builder
SoundEvent
instances| Modifier and Type | Method and Description |
|---|---|
default @NotNull SoundEvent.Builder |
addSound(Sound sound)
Adds a sound to this sound event.
|
@NotNull SoundEvent.Builder |
addSound(@NotNull SoundEntry soundEntry)
Adds a sound to this sound event.
|
default @NotNull SoundEvent.Builder |
addSound(@NotNull SoundEvent soundEvent)
Adds a sound to this sound event.
|
@NotNull SoundEvent |
build()
Finishes building the
SoundEvent instance
using the previously set values |
@NotNull SoundEvent.Builder |
key(@NotNull net.kyori.adventure.key.Key key)
Sets the sound event's key
|
@NotNull SoundEvent.Builder |
replace(boolean replace)
Sets whether the sounds listed in
SoundEvent.sounds()
should replace the sounds listed in the default sound registry
for this sound event. |
@NotNull SoundEvent.Builder |
sounds(@NotNull java.util.List<SoundEntry> sounds)
Sets the sounds this sound event uses, one of the listed sounds
is randomly selected to play when this sound event is triggered
|
default @NotNull SoundEvent.Builder |
sounds(SoundEntry... sounds)
Sets the sounds this sound event uses, one of the listed sounds
is randomly selected to play when this sound event is triggered
|
@NotNull SoundEvent.Builder |
subtitle(@Nullable java.lang.String subtitle)
Sets the sound event subtitle, which is translated as the
subtitle of the sound if "Show Subtitles" is enabled in-game
|
@Contract(value="_ -> this") @NotNull @NotNull SoundEvent.Builder key(@NotNull @NotNull net.kyori.adventure.key.Key key)
key - The sound event's key@Contract(value="_ -> this") @NotNull @NotNull SoundEvent.Builder replace(boolean replace)
SoundEvent.sounds()
should replace the sounds listed in the default sound registry
for this sound event. False if the sounds listed should be added
to the list of default soundsreplace - True to replace default sounds@Contract(value="_ -> this") @NotNull @NotNull SoundEvent.Builder subtitle(@Nullable @Nullable java.lang.String subtitle)
subtitle - The sound subtitle@Contract(value="_ -> this") @NotNull @NotNull SoundEvent.Builder sounds(@NotNull @NotNull java.util.List<SoundEntry> sounds)
sounds - The sounds this sound event uses@Contract(value="_ -> this") @NotNull @NotNull SoundEvent.Builder addSound(@NotNull @NotNull SoundEntry soundEntry)
soundEntry - The sound entry@Contract(value="_ -> this") @NotNull default @NotNull SoundEvent.Builder addSound(@NotNull Sound sound)
sound - The sound@Contract(value="_ -> this") @NotNull default @NotNull SoundEvent.Builder addSound(@NotNull @NotNull SoundEvent soundEvent)
soundEvent - The sound event@Contract(value="_ -> this") @NotNull default @NotNull SoundEvent.Builder sounds(@NotNull SoundEntry... sounds)
sounds - The sounds this sound event uses@NotNull @NotNull SoundEvent build()
SoundEvent instance
using the previously set valuesinstance