How to play a sound with a command in Minecraft
Type /playsound minecraft:entity.player.levelup player @a in chat as an operator to play the level up sound for every player.
playsound
Plays a sound for players at a position, with a sound category, volume and pitch.
/playsound <sound> [<source>] [<targets>] [<pos>] [<volume>] [<pitch>] [<minVolume>] Examples
/playsound minecraft:entity.player.levelup player @a Plays the level-up sound.
/execute as @a at @s run playsound minecraft:block.note_block.pling master @s ~ ~ ~ 1 2 A high ping at each player's position.
Arguments
soundRequired- Sound event ID, for example
minecraft:entity.player.levelup. sourceOptional- Sound category. Defaults to
master. targetsOptional- Players who hear it.
posOptional- Where the sound plays from.
volumeOptional- Volume and range, 1 is normal.
pitchOptional- From 0 to 2, 1 is normal.
What it does
The source (master, music, record, weather, block, hostile, neutral, player, ambient, voice or ui) decides which volume slider applies. Volume above 1 makes the sound reach further rather than louder. Pitch ranges from 0 to 2, and minVolume lets players outside the range still hear it.
Good to know
- Needs operator permission level 2.
- From the console the position defaults to the world spawn, so run it
ateach player as in the example.
Run it on your server
On a SLASHPLAY server, type it in the Console tab without the leading slash; in game, operators type it in chat with the slash. New to this? Start a Minecraft server first.
Your own
Minecraft server.
From $0.03 an hour, only while it runs. New accounts get 6 free tokens.