public static interface SoundEntry.Builder
SoundEntry
instances, since it has a lot of parameters, we create
a builder for ease its creation| Modifier and Type | Method and Description |
|---|---|
@NotNull SoundEntry.Builder |
attenuationDistance(int attenuationDistance)
Sets the attenuation distance for the sound.
|
@NotNull SoundEntry |
build()
Finishes building the
SoundEntry instance,
this method may fail if values were not correctly
provided. |
@NotNull SoundEntry.Builder |
key(@NotNull net.kyori.adventure.key.Key key)
Sets the sound key for the sound entry.
|
default @NotNull SoundEntry.Builder |
nameEvent(@NotNull net.kyori.adventure.key.Key key)
Deprecated.
Set
type(team.unnamed.creative.sound.SoundEntry.Type) and key(net.kyori.adventure.key.Key) separately instead |
default @NotNull SoundEntry.Builder |
nameEvent(@NotNull java.lang.String name)
Deprecated.
Set
type(team.unnamed.creative.sound.SoundEntry.Type) and key(net.kyori.adventure.key.Key) separately instead |
default @NotNull SoundEntry.Builder |
nameSound(@NotNull net.kyori.adventure.key.Key key)
Deprecated.
Set
type(team.unnamed.creative.sound.SoundEntry.Type) and key(net.kyori.adventure.key.Key) separately instead |
@NotNull SoundEntry.Builder |
pitch(float pitch)
Sets the pitch for the sound.
|
@NotNull SoundEntry.Builder |
preload(boolean preload)
Sets the preload value for the sound.
|
@NotNull SoundEntry.Builder |
stream(boolean stream)
Sets whether the sound should be streamed.
|
@NotNull SoundEntry.Builder |
type(@NotNull SoundEntry.Type type)
Sets the sound type for the sound entry.
|
@NotNull SoundEntry.Builder |
volume(float volume)
Sets the volume for the sound.
|
@NotNull SoundEntry.Builder |
weight(int weight)
Sets the weight for the sound.
|
@Contract(value="_ -> this") @NotNull @NotNull SoundEntry.Builder type(@NotNull @NotNull SoundEntry.Type type)
If type is SoundEntry.Type.EVENT, the set
key must be a SoundEvent key.
If type is SoundEntry.Type.FILE, the set
key must be a Sound key.
type - The sound type@Contract(value="_ -> this") @NotNull @NotNull SoundEntry.Builder key(@NotNull @NotNull net.kyori.adventure.key.Key key)
key - The sound key@Deprecated @ApiStatus.ScheduledForRemoval(inVersion="2.0.0") @Contract(value="_ -> this") @NotNull default @NotNull SoundEntry.Builder nameSound(@NotNull @NotNull net.kyori.adventure.key.Key key)
type(team.unnamed.creative.sound.SoundEntry.Type) and key(net.kyori.adventure.key.Key) separately insteadSound key for the sound entry.key - The sound key@Deprecated @ApiStatus.ScheduledForRemoval(inVersion="2.0.0") @Contract(value="_ -> this") @NotNull default @NotNull SoundEntry.Builder nameEvent(@NotNull @NotNull net.kyori.adventure.key.Key key)
type(team.unnamed.creative.sound.SoundEntry.Type) and key(net.kyori.adventure.key.Key) separately insteadSoundEvent key for the sound entry.key - The sound event key@Deprecated @ApiStatus.ScheduledForRemoval(inVersion="2.0.0") @Contract(value="_ -> this") @NotNull default @NotNull SoundEntry.Builder nameEvent(@NotNull @NotNull java.lang.String name)
type(team.unnamed.creative.sound.SoundEntry.Type) and key(net.kyori.adventure.key.Key) separately insteadSoundEvent name for the sound entry.name - The sound event name@Contract(value="_ -> this") @NotNull @NotNull SoundEntry.Builder volume(float volume)
volume - The sound volume@Contract(value="_ -> this") @NotNull @NotNull SoundEntry.Builder pitch(float pitch)
pitch - The sound pitch@Contract(value="_ -> this") @NotNull @NotNull SoundEntry.Builder weight(int weight)
weight - The sound weight@Contract(value="_ -> this") @NotNull @NotNull SoundEntry.Builder stream(boolean stream)
stream - True if the sound should be streamed@Contract(value="_ -> this") @NotNull @NotNull SoundEntry.Builder attenuationDistance(int attenuationDistance)
attenuationDistance - The attenuation distance@Contract(value="_ -> this") @NotNull @NotNull SoundEntry.Builder preload(boolean preload)
preload - True if the sound should be preloaded@NotNull @NotNull SoundEntry build()
SoundEntry instance,
this method may fail if values were not correctly
provided.