Commands/stopsound

From Minecraft Wiki
Jump to: navigation, search
stopsound
Restrictions

Operator

First introduced

Java Edition 1.9.3 (1.9.3-pre2)
PE 1.0.5 (PE alpha 1.0.5.0)

Stops a given sound.

Syntax[edit]

  • Java Edition
stopsound <targets> [<source>] [<sound>]
  • Bedrock Edition
stopsound <player: target> [sound: string]

Arguments[edit]

JE<targets>: entity
BE: player: target: CommandSelector<Player>

Must be a player name, a target selector or a UUID. And the target selector must be of player type.
Specifies the command's target.

JE: <source>

Must be master, music, record, weather, block, hostile, neutral, player, ambient, voice, or *.
Specifies which category in the Music & Sound options the sound falls under. If it is *, stop sound of all category.

JE<sound>: resource_location
BE: sound: string: basic_string

Specifies the sound to stop.
In Bedrock Edition, it must be either a single word (no spaces) or a quoted string. Can be a sound event defined in sound_definitions.json (for example, mob.pig.say).
In Java Edition, must be a namespaced ID. Must be a sound event defined in sounds.json (for example, entity.pig.ambient).

Result[edit]

CommandTriggerJava EditionBedrock Edition
anythe arguments are not specified correctly Unparseable Failed
if <targets> or player: target fails to resolve to one or more online players Failed
On successStops the specified sound(s) for the targeted players.

Output[edit]

CommandEditionSituationSuccess Count/execute store success .../execute store result ...
anyJava EditionOn fail000
On success11the number of targeted players
Bedrock EditionOn fail0N/AN/A
On successthe number of targeted playersN/AN/A

History[edit]

Java Edition
1.9.3pre2Added /stopsound.
Pocket Edition
1.0.5alpha 1.0.5.0Added /stopsound.

See also[edit]