Version: 0.4.2
SoundSourceEntry
The SoundSourceEntry
class is used to have a sound play at a specific entity in the world. This can be a moving target like an NPC. The sound source can be used in an entry with a Sound
parameter.
Usage
@Entry("example_sound_source", "An example sound source entry.", Colors.GREEN, Icons.VOLUME_HIGH)
class ExampleSoundSourceEntry(
override val id: String,
override val name: String,
) : SoundSourceEntry {
fun getEmitter(): net.kyori.adventure.sound.Sound.Emitter {
// Return the emitter that should be used for the sound.
// A bukkit entity can be used here.
}
}
This can be combined with other entry types like Speaker
. For example, an NPC that speaks can also be a sound emitter.