Skip to main content
 Warning: Unmaintained Version
Version: 0.4.2

SoundIdEntry

The SoundIdEntry is an interface derived from StaticEntry, specifically designed for managing custom sounds within the TypeWriter Spigot plugin. If a server is using a custom resource pack, the SoundIdEntry can be used to add a reference to a custom sound within the resource pack.

Usage

@Entry("example_sound", "An example sound entry.", Colors.GREEN, Icons.VOLUME_HIGH)
class ExampleSoundIdEntry(
override val id: String,
override val name: String,
override val soundId: String,
) : SoundIdEntry

Normally a SoundIdEntry handled by the interface when an entry needs a sound. If you ever would need to access the sound ID directly, it can be done like this:

val id = // ID of the custom sound
val entry = Query.findById<ExampleSoundIdEntry>(id)
val customSound = entry.soundId