

Accepts tilde and caret notations.īE: volume: float: float Specifies the distance that the sound can be heard. Must be a three-dimensional coordinates with floating-point number elements. And the target selector must be of player type.īE: position: x y z: CommandPositionFloat Specifies the position to play the sounds from. Must be a player name, a target selector or a UUID. Must be master, music, record, weather, block, hostile, neutral, player, ambient, or voice.īE: player: target: CommandSelector Specifies the sound's target. JE: Specifies the music category and options the sound falls under. 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 already defined in events). Resource packs may add their own events to sounds.json the command successfully plays these. For example, the sound event plays one of several pig sounds at random, because the event has multiple sounds associated with it. A sound event may be affiliated with multiple sounds, and the sound that is actually produced is chosen at random from them, modified by their "weight", just as the game normally would. Can be a Sound Event defined in sounds.json (for example, ). In Java Edition, must be a resource location.

Can be a sound event defined in sound_definitions.json (for example, ). In Bedrock Edition, it must be either a single word (no spaces) or a quoted string. Playsound Arguments īE: sound: string: basic_string Specifies the sound to play.
