NoteBlockAPI 1.2.4(MC1.8+)

Play .nbs files as noteblock sounds

  1. koca2000
    Tested Minecraft Versions:
    • 1.8
    • 1.9
    • 1.10
    • 1.11
    • 1.12
    • 1.13
    Contributors:
    xxmicloxx

    Play your favorite songs ingame!

    Do you want official player? Then use this: NoteBlockMusicPlayer

    Dev builds are available here

    The original author is xxmicloxx. You can find his thread here.

    Features
    • play .nbs files ingame as noteblock sounds
    • easy to use
    • uses multi threading
    • can play custom instruments via resource pack and pling
    Plugins that use NoteBlockAPI
    NoteBlockPlayer: play for certain or all players .nbs files
    Pl3xPager: get your attention by playing .nbs files
    McMusic: play .nbs files
    ServerMusic: play .nbs files with signs
    icJukeBox: song selector with a fancy chest-gui
    Dubstep Gun: use the power of Dupstep
    JoinMusik: play a .nbs file for players that join your server
    JukeBox
    ♪ Noteblock Worldguard ♪

    ColorfulMix - music in lobby and arena

    Instruments from 1.12 on 1.8 - 1.11 servers
    By default they are simply skipped. You can enable them by using resource pack.

    How to get .nbs
    Download .nbs files
    You can simply download a few songs here:
    .nbs list or scroll down for another list

    Convert .midi to .nbs
    use Minecraft Note Block Studio:
    http://www.stuffbydavid.com/mcnbs
    1. import your .midi file to Note Block Studio;
    2. save the file as .nbs file in your plugin folder

    How to use (since version 1.1.0)
    Step 1:
    If you use Maven, add this to your pom.xml(for last version):
    Code (Text):
        <repositories>
            <repository>
                <id>jitpack.io</id>
                <url>https://jitpack.io</url>
            </repository>
        </repositories>

        <dependency>
            <groupId>com.github.koca2000</groupId>
            <artifactId>NoteBlockAPI</artifactId>
            <version>-SNAPSHOT</version>
        </dependency>
    or add jar to your project dependencies.

    Step 2:
    add this line to your plugin.yml:
    Code (Text):
    depend: [NoteBlockAPI]
    Step 3:
    Parse a .nbs file
    Code (Text):
    Song s = NBSDecoder.parse(new File(getDataFolder(), "Song.nbs"));
    or
    Code (Text):
    Song s = NBSDecoder.parse(new File("/plugins/myplugin/Song.nbs"));
    Step 4:
    Create a player for the song
    Code (Text):
    SongPlayer sp = new RadioSongPlayer(s);
    Step 5:
    define if the song should end when no one listens to it
    Code (Text):
    sp.setAutoDestroy(true);
    Step 6:
    Add players to Song
    Code (Text):
    sp.addPlayer(e.getPlayer());
    Step 7:
    Play song
    Code (Text):
    sp.setPlaying(true);

    GitHub (new)
    https://github.com/koca2000/NoteBlockAPI


    GitHub (original)
    https:github.com/xxmicloxx/NoteBlockAPI

    Donators
    Be first on the list!

    If you like my updates please consider making a donation:
    [​IMG]
    andrei1058, Dawid, HalbKlug and 5 others like this.

Recent Updates

  1. v1.2.4
  2. v1.2.3.1
  3. v1.2.3

Recent Reviews

  1. DrOreo002
    DrOreo002
    5/5,
    Version: 1.2.4(MC1.8+)
    Really cool plugin!. Thank you so much for this man!, its really useful for my server ;)
  2. Lazo
    Lazo
    5/5,
    Version: 1.2.3.1(MC1.8+)
    NoteblockAPI offers rich amount of API. Our server and plugin are taking advantage of this. However, when I develop my plugin with this API, I couldn't remove offline players from a radio which is necessary to keep the radio channel clean.
    1. koca2000
      Author's Response
      Thanks for the review. Feature you request will be added in next version.
  3. ilya50
    ilya50
    5/5,
    Version: 1.2.3.1(MC1.8+)
    Thanks for the free and very useful api. Thanks to him, I was able to write a music plugin
  4. ZockerAxel
    ZockerAxel
    5/5,
    Version: 1.2.2.1(MC1.8+)
    Really great Resource if you want Music on your server and features a great API to use in your Plugins!
  5. SkytAsul
    SkytAsul
    5/5,
    Version: 1.2.1(MC1.8+)
    Great update here ! Nice to see that the code is more clean now ^^
    Keep up like this !!
  6. StupidDrew9
    StupidDrew9
    5/5,
    Version: 1.2.0(MC1.8+)
    Great API, fairly straightforward and easy to use. Has all the methods that I needed. Could use more documentation (took me a while to figure out what the layerHashMap was in the Song class, etc)
    1. koca2000
      Author's Response
      I am working on Github wiki and javadoc.
  7. ItzzSebasGamer
    ItzzSebasGamer
    5/5,
    Version: 1.2.0(MC1.8+)
    API usage?
    -----------------------------------------------------------------------------------------------------------------
  8. _Avery
    _Avery
    5/5,
    Version: 1.2.0(MC1.8+)
    This is a very nice and useful API. But can i ask if a song is over, because i want display the title of the song and thats the reason why i need a method.
    1. koca2000
      Author's Response
      You can use SongEndEvent. If you need more info, please use PM.
  9. File14
    File14
    5/5,
    Version: 1.2.0(MC1.8+)
    Working great. The developer of this plugin responds fast. Thank you for making this plugin!
  10. Sprax2013
    Sprax2013
    5/5,
    Version: 1.1.9(MC1.8+)
    Works great! Reported an issue on GitHub and it was fixed really quick!
    Nice Dev. Nice API. Helped me a lot :)