From Minecraft Wiki
Jump to: navigation, search


First introduced

Java Edition 1.6.1 (1.6.1-pre)
PE 1.0.5 (Pocket Edition alpha

Plays a sound.

  • Java Edition
playsound <sound> <source> <player> [x] [y] [z] [volume] [pitch] [minimumVolume]
  • Bedrock Edition
playsound <sound: string> [player: target] [position: x y z] [volume: float] [pitch: float] [minimumVolume: float]
sound (BE: sound: string)
Specifies the sound to play. Must be a sound event defined in sounds.json (sound_definitions.json in Bedrock Edition) (for example, mob.pig.say).
A sound event may be affiliated with multiple sounds, and the sound which is actually produced will be chosen at random from them, modified by their "weight", just as the game normally would. For example, the mob.pig.say sound event will play one of several pig sounds at random, because the event has multiple sounds associated with it.
Resource packs may add their own events to sounds.json; the command will successfully play these. File names are not used by this command; it strictly uses the events defined in sounds.json (which may not even be similar to the original file names and paths), and thus a resource pack adding new sound files must define events for them (this is not necessary when replacing old sounds which are already in defined events).
source[Java Edition only]
Specifies which category in the music & sound options the sound falls under. Must be master, music, record, weather, block, hostile, neutral, player, ambient, or voice.
player (BE: player: target)
Specifies the sound's target. Must be a player name or a target selector.
x y z (BE: position: x y z) (optional)
Specifies the position to play the sounds from. May use tilde notation to specify a position relative to the execution.
volume (BE: volume: float) (optional)
Specifies the distance that the sound can be heard. Must be at least 0.0. For values less than 1.0, the sound will be quieter and have a smaller sphere within which it may be heard. For values greater than 1.0, the sound will not actually grow louder, but its audible range (a 16-block radius at 1.0) will be multiplied by volume. There will always be a gradual falloff to silence based on distance from the center of the sphere.
pitch (BE: pitch: float) (optional)
Specifies the pitch of the sound. In Java Edition, it must be between 0.0 and 2.0 (inclusive), and values less than 0.5 are equivalent to 0.5. Values lower than 1.0 lower the pitch and increase the duration; values greater than 1.0 raise the pitch and reduce the duration. The pitch value is a multiplier applied to the frequency, so if a value between 0.5 and 1.0 (inclusive) is doubled, the pitch will be an octave higher. (If you're a musician wishing to convert other intervals to pitch values, see Note block#Usage, but be aware that 1.0 won't be F♯ for all sound effects.) In Bedrock Edition, only values between 0.0 and 256.0 would work. Values more than 256.0 are equivalent to the default value; Values less than 0.0 (inclusive) will make the sound unable to hear.[more information needed] If not specified, defaults to 1.0.
minimumVolume (BE: minimumVolume: float) (optional)
Specifies the volume for targets outside the sound's normal audible sphere. If a target is outside the normal sphere, the sound will instead be centered some short distance from the target (less than four blocks away), and minimumVolume will determine its volume. Must be between 0.0 and 1.0 (inclusive).
Fails if the arguments are not specified correctly, if player fails to resolve to one or more online players, or if the targets are unable to hear the sound from where it is played.
On success, plays a sound for the targeted players.
See also
/stopsound — Stops a sound.


Java Edition
1.6.1preAdded /playsound.
1.915w49a/playsound now accepts tab-completion.
16w02a/playsound now requires a source parameter, specifying what is the sound's category for volume purposes.
Pocket Edition
1.0.5alpha /playsound.