View at: Template:Commands/content [edit]
Commands/music - minecraft.fandom.com
Treść tej podstrony pochodzi z artykułu „Commands/music” w domenie minecraft.fandom.com na licencji CC BY-NC-SA 3.0
This feature is exclusive to Bedrock Edition and Minecraft Education.
Plays, queues, stops the music, or adjusts the music volume.
Syntax[]
music play <trackName: string> [volume: float] [fadeSeconds: float] [repeatMode: MusicRepeatMode]- Plays the music track.
music queue <trackName: string> [volume: float] [fadeSeconds: float] [repeatMode: MusicRepeatMode]- Adds the music track to the queue.
music stop [fadeSeconds: float]- Stops the music.
music volume <volume: float>- Adjusts the music volume.
Arguments[]
trackName: string: basic_string
- Specifies a music track to play.
- Must be a string. And it must be a single word that has no space or a quoted string.
- Must be a music track name (e.g.
record.cat), or a music track defined under the Json path"record.<music_name>"or"music.game.<music_name>"in the <a_resource_pack>/sounds/sound_definitions.json file (e.g.catto play "Cat" music disc).
volume: float: float
- Specifies the volume of the music track.
- Must be a Single-precision floating-point format number. Should be between 0 and 1 (inclusive).
fadeSeconds: float: float
- Specifies the duration the music track fades in/out.
- Must be a Single-precision floating-point format number. Should be between 0 and 10 (inclusive).
repeatMode: MusicRepeatMode
- Specifies whether the music track repeats or not. If unspecified, defaults to
play_once. - Must be one of
loopandplay_once.
Result[]
| Command | Trigger | Bedrock Edition |
|---|---|---|
| any | the arguments are not specified correctly | Unparseable |
/music play ... | the fade seconds is higher than 10 or lower than 0 | Failed |
| the volume is higher than 1 or lower than 0 | ||
/music queue ... | the current played music is set to loop | |
| the volume is higher than 1 or lower than 0 | ||
| the fade seconds is higher than 10 or lower than 0 | ||
/music stop ... | no music is playing | |
| the fade seconds is higher than 10 or lower than 0 | ||
/music volume ... | the volume is higher than 1 or lower than 0 | |
| any | Otherwise | Successful |
Output[]
| Command | Edition | Situation | Success Count |
|---|---|---|---|
| any | Bedrock Edition | On fail | 0 |
| On success | 1 |
Example[]
Play the Pigstep music disc on repeat.
/music play record.pigstep 0.5 0 loop
Queue the Stal music disc.
/music queue record.stal 0.5 0 play_once
History[]
| Bedrock Edition | |||||
|---|---|---|---|---|---|
| 1.16.100 | beta 1.16.100.58 | Added /music. | |||