OmniGame logoOmniGame

/playsound Command

Plays a specified sound event to targeted players from a given position, at a given volume and pitch. The source determines which in-game audio channel (and thus which volume slider) controls the sound.

Syntax
playsound <sound> <source> <targets> [<pos>] [<volume>] [<pitch>] [<minVolume>]
Permission: 2 (gamemaster / cheats enabled)Edition: Both

Examples

/playsound minecraft:entity.player.levelup master @a/playsound minecraft:block.note_block.bell record @p ~ ~ ~ 1 1/playsound minecraft:ui.button.click master @a ~ ~ ~ 0.5 1.5/playsound minecraft:entity.ender_dragon.growl hostile @a 0 64 0 2 0.8 0.1

Notes

source must be one of: master, music, record, weather, block, hostile, neutral, player, ambient, voice, ui. volume controls how far away the sound can be heard (default 1); pitch controls playback speed and tone (0.5 to 2.0, default 1). minVolume (0.0–1.0) sets minimum audible volume for distant players. Sound names are resource locations found in sounds.json.

More commands