Play sounds with custom source, volume, pitch, and position settings.
/playsound minecraft:entity.experience_orb.pickup master @s ~ ~ ~ 1 1
Minimum volume for players far from the source. Set to 0 to omit.
The /playsound command plays a sound event to one or more players with full control over source category, volume, pitch, and position. This playsound command generator helps you build the correct syntax from the complete sound event registry.The syntax is /playsound <sound> <source> <targets> [pos] [volume] [pitch] [minVolume]. The sound parameter takes a namespaced sound event ID, and the source parameter controls which audio slider governs the playback volume in the player's settings.
Map makers and data pack creators use playsound extensively. It adds audio feedback to custom items, ambient sounds to builds, boss fight music, and alert tones for minigames. Pair it with the /particle command for combined audiovisual effects.
@a for all players, @s for yourself, or @p for the nearest player.The source category maps to the audio sliders in Minecraft's Music & Sounds settings. Choosing the correct category lets players independently control the volume of your custom sounds.
| Source | Settings Slider | Best For |
|---|---|---|
| master | Master Volume | Sounds that should always play at full volume |
| music | Music | Background music, boss themes |
| Jukebox/Noteblocks | Music disc playback, custom jukebox sounds | |
| weather | Weather | Rain, thunder, custom weather effects |
| Blocks | Block placement, breaking, mechanism sounds | |
| Hostile Creatures | Monster alerts, custom mob sounds | |
| neutral | Friendly Creatures | Passive mob sounds, NPC dialogue |
| player | Players | Footsteps, eating, player-specific effects |
| ambient | Ambient/Environment | Cave sounds, water ambiance, environmental loops |
| voice | Voice/Speech | Narrator, custom voice lines |
mypack:custom.alert. Works great for /stopsound to halt a playing sound. Useful for cutting music when a boss fight ends or silencing ambient loops on area exit.It plays a sound event to specified players. You control the sound type, source category (which audio slider governs it), volume, pitch, and the 3D position the sound originates from. The sound attenuates with distance from the specified position.
There are 10 source categories: master, music, record, weather, block, hostile, neutral, player, ambient, and voice. Each maps to a volume slider in Minecraft's sound settings. Choosing the right category lets players adjust your custom sound volumes independently.
Values from 0.0 to 1.0 set the actual loudness. Values above 1.0 increase the audible range instead of the volume. The formula is volume x 16 = maximum distance in blocks. So a volume of 2.0 can be heard up to 32 blocks away.
Browse more Minecraft tools: