Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Minecraft:Commands/music: Difference between revisions

From SAS Gaming Wiki
imported>MinecraftBedrockPlayer7
 
SyncBot (talk | contribs)
Fix template calls: add MC/ prefix
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
{{exclusive|bedrock|education}}
{{MC/Exclusive|bedrock|education}}
{{Infobox command
{{Infobox command
|name=music
|name=music
Line 6: Line 6:
}}
}}


Plays, queues, stops the [[Minecraft:music]], or adjusts the music volume.
Plays, queues, stops the music, or adjusts the music volume.


== Syntax ==
== Syntax ==
Line 19: Line 19:


== Arguments ==
== Arguments ==
{{argument|be=1|trackName: string|basic_string}}
{{MC/Argument|be=1|trackName: string|basic_string}}
: Specifies a music track to play.
: Specifies a music track to play.
: {{arg desc|be=basic_string}}
: {{MC/Arg desc|be=basic_string}}
: Must be a music track name (e.g. <code>record.cat</code>), or a music track defined under the Json path <code>"record.<music_name>"</code> or <code>"music.game.<music_name>"</code> in the <samp><a_resource_pack>/sounds/sound_definitions.json</samp> file (e.g. <code>cat</code> to play "Cat" music disc).
: Must be a music track name (e.g. <code>record.cat</code>), or a music track defined under the Json path <code>"record.<music_name>"</code> or <code>"music.game.<music_name>"</code> in the <samp><a_resource_pack>/sounds/sound_definitions.json</samp> file (e.g. <code>cat</code> to play "Cat" music disc).


{{argument|be=1|volume: float|float}}
{{MC/Argument|be=1|volume: float|float}}
: Specifies the volume of the music track.
: Specifies the volume of the music track.
: {{arg desc|be=float}} Should be between 0 and 1 (inclusive).
: {{MC/Arg desc|be=float}} Should be between 0 and 1 (inclusive).


{{argument|be=1|fadeSeconds: float|float}}
{{MC/Argument|be=1|fadeSeconds: float|float}}
: Specifies the duration the music track fades in/out.
: Specifies the duration the music track fades in/out.
: {{arg desc|be=float}} Should be between 0 and 10 (inclusive).
: {{MC/Arg desc|be=float}} Should be between 0 and 10 (inclusive).


{{argument|be=1|repeatMode: MusicRepeatMode|enum}}
{{MC/Argument|be=1|repeatMode: MusicRepeatMode|enum}}
: Specifies whether the music track repeats or not. If unspecified, defaults to <code>play_once</code>.
: Specifies whether the music track repeats or not. If unspecified, defaults to <code>play_once</code>.
: Must be one of <code>loop</code> and <code>play_once</code>.
: Must be one of <code>loop</code> and <code>play_once</code>.
Line 53: Line 53:
==Output==
==Output==


{{Output table|onlybe=1}}
{{MC/Output table|onlybe=1}}
{{Output table|edition=be|On fail|0}}
{{MC/Output table|edition=be|On fail|0}}
{{Output table|On success|1}}
{{MC/Output table|On success|1}}
{{Output table}}
{{MC/Output table}}


== Example ==
== Example ==
Line 67: Line 67:
== History ==
== History ==
{{HistoryTable
{{HistoryTable
|{{HistoryLine|bedrock}}
|{{MC/HistoryLine|bedrock}}
|{{HistoryLine||1.16.100|dev=beta 1.16.100.58|Added {{cmd|music|link=none}}.}}
|{{HistoryLine||1.16.100|dev=beta 1.16.100.58|Added {{MC/Cmd|music|link=none}}.}}
}}
}}


Line 76: Line 76:


== Navigation ==
== Navigation ==
{{Navbox commands}}
{{MC/Navbox commands}}


[[Minecraft:de:Befehl/music]]
de:Befehl/music
[[Minecraft:ja:コマンド/music]]
ja:コマンド/music
[[Minecraft:lzh:令/music]]
lzh:令/music
[[Minecraft:pt:Comandos/music]]
pt:Comandos/music
[[Minecraft:ru:Команды консоли/music]]
ru:Команды консоли/music
[[Minecraft:zh:命令/music]]
zh:命令/music

Latest revision as of 20:12, 9 April 2026

Script error: No such module "Exclusive". Template:Infobox command

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.
{{#vardefine:onlyje|Template:IN,}}{{#vardefine:onlybe|}}{{#vardefine:je-arg|}}{{#vardefine:be-arg|string}}Template:Error{{#vardefine:onlyje|}}{{#vardefine:onlybe|}}{{#vardefine:je-arg|}}{{#vardefine:be-arg|}}
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. cat to play "Cat" music disc).

volume: float: float

Specifies the volume of the music track.
{{#vardefine:onlyje|Template:IN,}}{{#vardefine:onlybe|}}{{#vardefine:je-arg|}}{{#vardefine:be-arg|float}}Template:Error{{#vardefine:onlyje|}}{{#vardefine:onlybe|}}{{#vardefine:je-arg|}}{{#vardefine:be-arg|}} Should be between 0 and 1 (inclusive).

fadeSeconds: float: float

Specifies the duration the music track fades in/out.
{{#vardefine:onlyje|Template:IN,}}{{#vardefine:onlybe|}}{{#vardefine:je-arg|}}{{#vardefine:be-arg|float}}Template:Error{{#vardefine:onlyje|}}{{#vardefine:onlybe|}}{{#vardefine:je-arg|}}{{#vardefine:be-arg|}} Should be between 0 and 10 (inclusive).

repeatMode: MusicRepeatMode: enum

Specifies whether the music track repeats or not. If unspecified, defaults to play_once.
Must be one of loop and play_once.

Result

Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table

Output

{{#vardefine:output-table-lines|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:output-table-lines|-2}}{{#vardefine:output-table-lines-now|}}{{#vardefine:command-num-now|}}{{#vardefine:command-line-now|}}{{#vardefine:commands-num|}}{{#vardefine:output-edition-num-now|}}{{#vardefine:output-edition-line-now|}}{{#vardefine:output-editions-num|}}{{#vardefine:je-outputs-dis|}}

{{#vardefine:output-table-lines|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:situation-{{#var:output-table-lines}}|On fail}}{{#vardefine:output1-{{#var:output-table-lines}}|0}}{{#vardefine:output2-{{#var:output-table-lines}}|N/A}}{{#vardefine:output3-{{#var:output-table-lines}}|N/A}}{{#vardefine:command-row-{{#var:commands-num}}|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:output-editions-num|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:output-edition-{{#var:output-editions-num}}|be}}{{#vardefine:output-edition-row-{{#var:output-editions-num}}|1}} {{#vardefine:output-table-lines|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:situation-{{#var:output-table-lines}}|On success}}{{#vardefine:output1-{{#var:output-table-lines}}|1}}{{#vardefine:output2-{{#var:output-table-lines}}|N/A}}{{#vardefine:output3-{{#var:output-table-lines}}|N/A}}{{#vardefine:command-row-{{#var:commands-num}}|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:output-edition-row-{{#var:output-editions-num}}|Expression error: Unrecognized punctuation character "{".}}

{{#vardefine:output-table-lines|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:output-table-lines|-2}}{{#vardefine:output-table-lines-now|}}{{#vardefine:command-num-now|}}{{#vardefine:command-line-now|}}{{#vardefine:commands-num|}}{{#vardefine:output-edition-num-now|}}{{#vardefine:output-edition-line-now|}}{{#vardefine:output-editions-num|}}{{#vardefine:je-outputs-dis|}}

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

Template:HistoryTable

External links

Navigation

All editions
Removed
Template:El only
Debug
Removed
Template:Els only
Template:El only
Removed
Template:El only
Removed
Template:Els only
Removed
Joke
Related

de:Befehl/music ja:コマンド/music lzh:令/music pt:Comandos/music ru:Команды консоли/music zh:命令/music