Skip to main content
 Warning: Unmaintained Version
Version: 0.5.1

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

ExampleSoundSourceEntry.kt
@Entry("example_sound_source", "An example sound source entry.", Colors.BLUE, "ic:round-spatial-audio-off")
class ExampleSoundSourceEntry(
override val id: String = "",
override val name: String = "",
) : SoundSourceEntry {
override fun getEmitter(): Sound.Emitter {
// Return the emitter that should be used for the sound.
// A bukkit entity can be used here.
return Sound.Emitter.self()
}
}

This can be combined with other entry types like Speaker. For example, an NPC that speaks can also be a sound emitter.