music.command.play:
default: op
music.command.stop:
default: op
/music-start - starts the sound, if the additional argument is specified, then the sound will be launched only for a specific player.
/music-stop - stops the sound, if the optional argument is specified, the sound will be stopped only for a specific player.
- it is possible to control sounds using the API, for example, to cause all players to sound examples start sound API:
MusicControllerApi.play('random.hurt'); // send start sound all players
MusicControllerApi.play(player, 'random.explode'); // send start sound only player
MusicControllerApi.stop('random.hurt'); // send stop sound all players
MusicControllerApi.stop(player, 'random.explode'); // send stop sound only player- at the moment the sound can be started and stopped, there is no pause of sound yet
- you can play sounds or music from the resource pack downloaded by the player (.mcpack) from the server, for example take my resource pack with music, it will be in the root of the project (github), this resource pack is called EpicMusic.mcpack
music tracks in the resource pack EpicMusic.mcpack:
- song.login
- song.waitgame
- song.alpha1
- song.alpha2
- song.alpha3
- song.alpha4
- song.alpha5
example command the start music - /music-start song.login
this server-side resourcepack (EpicMusic.mcpack) must be put in the resource_packs directory.