Skip to content
WikilyWIKILY
All games23 Wikis · pick your game
Commands and cheatsAll commands

Switch game

23 Wikis · pick your game
/playsound

Command

/playsound

Plays a sound to chosen players at a position, in a chosen sound category.

Syntax

/playsound <sound> [(ambient|block|hostile|master|music|neutral|player|record|ui|voice|weather) [<targets> [<pos> [<volume> [<pitch> [<minVolume>]]]]]]

Arguments

ArgumentKind of valueWhat to type
<sound>IdThe sound event to play, for example minecraft:entity.experience_orb.pickup.
<targets>Target selectorThe players who hear the sound. Defaults to the player running the command. One or more players.
<pos>Exact positionWhere the sound comes from. Defaults to the position the command runs from.
<volume>Decimal number0 or higher, default 1. Values above 1 increase how far the sound carries. At least 0.
<pitch>Decimal numberFrom 0.0 to 2.0, default 1, which is the normal pitch. From 0 to 2.
<minVolume>Decimal numberFrom 0.0 to 1.0, default 0. The volume for targets who are outside the sound's range. From 0 to 1.

Details

Permission level2: operators, worlds with cheats on, command blocks and functions
Works inSingleplayer with cheats enabled, operators on multiplayer servers, command blocks and functions.
ResultReports "Played sound <id> to <player>" or "Played sound <id> to <number> players". The number /execute store saves is the number of players who were sent the sound.
Sound categoriesThe category decides which volume slider in the sound settings controls the sound: master (Master Volume), music (Music), record (Jukebox/Note Blocks), weather (Weather), block (Blocks), hostile (Hostile Mobs), neutral (Friendly Mobs), player (Players), ambient (Ambient/Environment), voice (Narrator/Voice), ui (UI). Left out, it is master.
DefaultsWithout targets the sound plays only for the player who runs the command. Position defaults to where the command runs from, volume to 1, pitch to 1 and minimum volume to 0.
Volume and rangeA sound can be heard up to 16 blocks from its position. A volume above 1 extends the range to 16 blocks multiplied by the volume, so volume 2 reaches 32 blocks.
Minimum volumeA player outside the range hears nothing while minVolume is 0. With a minVolume above 0, that player hears the sound at that volume, coming from 2 blocks away in the direction of the real position.
Too far awayIf no target hears the sound the command fails with "The sound is too far away to be heard". This also happens when a command block or the console runs it without targets, and for players in another dimension.
Sound idsAny id is accepted, including sounds added by a resource pack. The command does not check that the sound exists.

Examples

/playsound minecraft:entity.experience_orb.pickup

Plays the experience pickup sound to you.

/playsound minecraft:block.note_block.pling master @a

Plays a Note Block pling at your position to all players in range.

/playsound minecraft:ui.toast.challenge_complete ui @s

Plays the challenge complete sound to you in the UI category.

/playsound minecraft:entity.ender_dragon.growl hostile @a ~ ~ ~ 2 0.8

Plays a deeper Ender Dragon growl that carries 32 blocks.

/playsound minecraft:entity.lightning_bolt.thunder weather @a 0 80 0 10 1 0.2

Plays thunder at 0 80 0 that carries 160 blocks; players farther away hear it quietly.

/playsound minecraft:music_disc.cat record @p ~ ~ ~ 1 1 1

Plays the music disc Cat to the nearest player, even if they are out of range.

Join the creator communityThe people who build the Minecraft Java Edition wiki are on our Discord. Ask questions or suggest pages.Join Discord (opens Discord in a new tab)