Stops a sound.
- Syntax
- Java Edition
stopsound <player> [source] [sound]
- Pocket Edition
stopsound <player: target> [sound: string]
- Arguments
- player (PE: player: target)
- Specifies the sound's target. Must be a player name or a target selector.
- source (optional)[Java Edition限定]
- Specifies which category in the music & sound options the sound falls under. Must be
master
,music
,record
,weather
,block
,hostile
,neutral
,player
,ambient
, orvoice
.
- Specifies which category in the music & sound options the sound falls under. Must be
- sound (PE: sound: string) (optional)
- Specifies the sound to stop. Must be a sound event defined in sounds.json (for example,
mob.pig.say
). If no sound if specified, stops all sounds.
- Specifies the sound to stop. Must be a sound event defined in sounds.json (for example,
- Result
- Fails if the arguments are not specified correctly, or if player fails to resolve to one or more online players.
- On success, stop the specified sound(s) for the targeted players.