Play music in your server using noteblocks!
- Your server software (possibly PocketMine-MP or its forks) supports noteblock
- Compatible with PocketMine-MP API version 2.0.0
- A player standing next to the noteblock with audio on and a working internet connection
- Songs should preferably be in a valid Classic NBS format and have a .nbs file extension
- Place the phar in your plugins folder of the server
- Run the server
- Stop the server
- Place .nbs files in the /plugins/ZMusicBox/songs directory of the server
- Run the server
- Place a noteblock
/music start Start playing a random song
/music stop Stop playing the current song
/music next Start playing a random song
/music loop [on|off] Switch to single loop mode
ZMusicBox is also accessible from its API:
- Switch to the Next Song
$this->getServer()->getPluginBase()->getPlugin("ZMusicBox")->StartNewTask();- Stop the music
$zmusicbox = $this->getServer()->getPluginBase()->getPlugin("ZMusicBox");
$zmusicbox->taskHandler->cancel();
$zmusicbox->taskHandler = null;- This is a fork of BrokenItZAndrei100/ZMusicBox, but downgraded to API 2.0.0 (tested on MCPE Alpha 0.14.3). If you are looking for a version compatible with API 3 to 4, it is recommended to take a look at it.
- note3crafter/ZMusicBox is also a fork of BrokenItZAndrei100/ZMusicBox and has been tested on Altay v.3.16.1 (Minecraft 1.16.100)
- Use Minecraft Note Block Studio to convert midi files into nbs files. Website: http://www.stuffbydavid.com/mcnbs
- Please do not use this code nor these algorithms for other plugins