Skip to content

wusheng233github/ZMusicBox

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

85 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ZMusicBox

Play music in your server using noteblocks!

Requirements

  • 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

How to use

  1. Place the phar in your plugins folder of the server
  2. Run the server
  3. Stop the server
  4. Place .nbs files in the /plugins/ZMusicBox/songs directory of the server
  5. Run the server
  6. Place a noteblock

Commands

/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

API

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;

Other Information

  • 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

About

Just play music in your server~

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%