playSound

fun playSound(level: ServerLevel, players: Collection<ServerPlayer>, sound: Identifier, soundSource: SoundSource, pos: Vec3, volume: Float = 1.0f, pitch: Float = 1.0f, minVolume: Float = 0.0f)

Play a sound to a set of players, performing distance attenuation and minimum volume handling.

Parameters

level

server level

players

players to send sound to

sound

sound identifier

soundSource

sound category/source

pos

sound origin position

volume

base volume

pitch

playback pitch

minVolume

minimum audible volume when out of range