Buy Me a Coffee at ko-fi.com

A global API which is used to play Minecraft sounds
Accessed using the name "sounds"

Returns a table with all registered custom sounds ids

overload 1:
SoundAPI.getCustomSounds(): java.util.Set
typings.-1383343454
Method PropertyFluent DescriptionRepresentation
Return Value

Checks if this sound id is registered either by custom avatar sounds or a vanilla sound

overload 1:
SoundAPI.isPresent(id: String): Boolean
typings.-1808118735typings.1729365000
Method PropertyFluent DescriptionRepresentation
id accepts
Return Value

Registers a new custom sound for this avatar
The first argument is the sound id while the second argument is either a byte array of the sound data or a base64 string representation of the same

overload 1:
SoundAPI.newSound(name: String, byteArray: Table): SoundAPI
typings.-1808118735typings.80563118typings.1807272619
Method PropertyFluent DescriptionRepresentation
name accepts
byteArray accepts
Return Value
overload 2:
SoundAPI.newSound(name: String, base64Text: String): SoundAPI
typings.-1808118735typings.-1808118735typings.1807272619
Method PropertyFluent DescriptionRepresentation
name accepts
base64Text accepts
Return Value

Plays the specified sound at the specified position with the given volume and pitch multipliers
The sound id is either an identifier or the custom sound name
Volume in Minecraft refers to how far away people can hear the sound from, not the actual loudness of it
If you don't give values for volume and pitch, the default values are 1

overload 1:
SoundAPI.playSound(sound: String, pos: Vector3): Sound
typings.-1808118735typings.2002444080typings.80074991
Method PropertyFluent DescriptionRepresentation
sound accepts
pos accepts
Return Value
overload 2:
SoundAPI.playSound(sound: String, posX: Number, posY: Number, posZ: Number): Sound
typings.-1808118735typings.-1950496919typings.-1950496919typings.-1950496919typings.80074991
Method PropertyFluent DescriptionRepresentation
sound accepts
posX accepts
posY accepts
posZ accepts
Return Value
overload 3:
SoundAPI.playSound(sound: String, pos: Vector3, volume: Number, pitch: Number, loop: Boolean): Sound
typings.-1808118735typings.2002444080typings.-1950496919typings.-1950496919typings.1729365000typings.80074991
Method PropertyFluent DescriptionRepresentation
sound accepts
pos accepts
volume accepts
pitch accepts
loop accepts
Return Value
overload 4:
SoundAPI.playSound(sound: String, posX: Number, posY: Number, posZ: Number, volume: Number, pitch: Number, loop: Boolean): Sound
typings.-1808118735typings.-1950496919typings.-1950496919typings.-1950496919typings.-1950496919typings.-1950496919typings.1729365000typings.80074991
Method PropertyFluent DescriptionRepresentation
sound accepts
posX accepts
posY accepts
posZ accepts
volume accepts
pitch accepts
loop accepts
Return Value

Stops the playing sounds from this avatar
If an id is specified, it only stops the sounds from that id

overload 1:
SoundAPI.stopSound(): SoundAPI
typings.1807272619
Method PropertyFluent DescriptionRepresentation
Return Value
overload 2:
SoundAPI.stopSound(id: String): SoundAPI
typings.-1808118735typings.1807272619
Method PropertyFluent DescriptionRepresentation
id accepts
Return Value