/stopsound
< Commands
/stopsound| Permission level required |
|
|---|---|
| Restrictions |
Cheat only |
{
"title": "<code>/stopsound</code>",
"rows": [
{
"field": "\n* 2 <sup class=\"noprint nowrap Inline-Template \" title=\"\">[<i><span title=\"This statement only applies to Java Edition\">(link to Java Edition article, displayed as JE) only</span></i>]</sup>\n* 1 <sup class=\"noprint nowrap Inline-Template \" title=\"\">[<i><span title=\"This statement only applies to Bedrock Edition\">(link to Bedrock Edition article, displayed as BE) only</span></i>]</sup>",
"label": "(link to Permission level article, displayed as Permission level<br>required)"
},
{
"field": "(link to Options article, displayed as Cheat) only<sup class=\"noprint nowrap Inline-Template \" title=\"\">[<i><span title=\"This statement only applies to Bedrock Edition\">(link to Bedrock Edition article, displayed as BE) only</span></i>]</sup>",
"label": "(link to Commands#Restrictions article, displayed as Restrictions)"
}
],
"invimages": [],
"images": []
}
Stops a given sound.
Syntax
- Java Edition
stopsound <targets> [<source>] [<sound>]
- Bedrock Edition
stopsound <player: target> [sound: string]
Arguments
JE: <targets>: entity
BE: player: target: CommandSelector<Player>
- Specifies the command's target.
- Must be a player name, a target selector or a UUID. And the target selector must/should be of player type. In Bedrock Edition, the target selector should be of player type.
JE: <source>
- Specifies which category in the Music & Sound options the sound falls under. If it is
*, stop sound of all category. - Must be
master,music,record,weather,block,hostile,neutral,player,ambient,voice, or*.
JE: <sound>: resource_location
BE: sound: string: basic_string
- Specifies the sound to stop. If no sound if specified, stops all sounds.
- In Bedrock Edition, must be a string. And it must be a single word that has no space or a double-quoted string (When quoted,
\can be used to escape characters). Should be a sound event defined in sound_definitions.json (for example,mob.pig.say). - In Java Edition, must be a resource location for an unregistered content. Should be a sound event defined in sounds.json (for example,
entity.pig.ambient).
Result
| Command | Trigger | Java Edition | Bedrock Edition |
|---|---|---|---|
| Any | The command is incomplete, or any argument is not specified correctly. | Unparseable | Unparseable |
player: target is a target selector that is not in player type. | N/A | Failed | |
<targets> or player: target fails to resolve to one or more online players. | Failed | ||
| Otherwise | Successful | ||
Output
| Command | Edition | Situation | Success Count | /execute store success ... | /execute store result ... |
|---|---|---|---|---|---|
| Any | Java Edition | On fail | 0 | 0 | 0 |
| On success | 1 | 1 | the number of targeted players | ||
| Bedrock Edition | On fail | 0 | N/A | N/A | |
| On success | the number of targeted players | N/A | N/A |
History
| Java Edition | |||||||
|---|---|---|---|---|---|---|---|
| 1.9.3 | pre2 | Added /stopsound. | |||||
| 1.13 | 17w45a | * can now be used instead of source to stop all sounds with a certain name, across all sources. | |||||
| Pocket Edition | |||||||
| 1.0.5 | alpha 1.0.5.0 | Added /stopsound. | |||||
See also
/playsound– plays a sound