Song/Sfx
Play sound from Minecraft. Sounds must be registered in Minecraft’s sounds.json.
Syntax
Play song:
song start %namespace:category.name% [%volume% %pitch% [fadein %fade_time%]] (--loop)Play sound effect:
sfx start %namespace:category.name% [%volume% %pitch% [fadein %fade_time%]] (--loop)Stop song:song stop %namespace:category.name% [fadeout %fade_time%]
Stop sound effect:sfx stop %namespace:category.name% [fadeout %fade_time%]
Stop all:song stop allsfx stop allsound stop all
INFO
If no namespace is provided, minecraft is used as the default.
Parameters
%namespace:category.name%(string, required): Sound identifier with optional namespace.%volume%(float, optional): Volume level (e.g.,0.5for half volume).%pitch%(float, optional): Pitch level (e.g.,1.2for higher pitch).loop(argument, optional): Whether to loop the sound.fadein %fade_time%(float, optional): Fade-in duration in seconds when starting sound.fadeout %fade_time%(float, optional): Fade-out duration in seconds when stopping sound.
Examples
song start narrativecraft:music.intro 0.8 1 fadein 2 --loopsfx start sfx.page_turn 1 1song stop narrativecraft:music.intro fadeout 3sfx stop sfx.page_turnsong stop allsound stop all