Skip to content
On this page
Common

BasicSoundApi

top.katton.api.audiocommon/src/main/kotlin/top/katton/api/audio/BasicSoundApi.kt
Platform scheduling hook; Paper installs entity-region scheduling.

BasicAudioScheduler ​

BasicAudioSchedulerCommonObject
kotlin
object BasicAudioScheduler

Platform scheduling hook; Paper installs entity-region scheduling.

playBasicSound ​

playBasicSoundCommonFunction
kotlin
fun playBasicSound(player: ServerPlayer, soundId: String, position: Vec3? = null, category: SoundSource = SoundSource.MUSIC, volume: Float = 1f, pitch: Float = 1f): CompletableFuture<Unit>

Play a client-known sound on all three platforms; completion confirms sending only.

stopBasicSound ​

stopBasicSoundCommonFunction
kotlin
fun stopBasicSound(player: ServerPlayer, soundId: String? = null, category: SoundSource? = null): CompletableFuture<Unit>

Stop by ID/category, not by playback instance. Null filters match all sounds.