NoteBlockAPI
NoteBlockAPI
NoteBlockAPI - play .nbs files as noteblock sounds
Play your favorite songs ingame!
Features
- play .nbs files ingame as noteblock sounds
- easy to use
- uses multi threading
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
Bamradio: 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
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/2:
add this line to your plugin.yml:
depend: [NoteBlockAPI]
Step 1:
Parse a .nbs file
Song s = NBSDecoder.parse(new File(getDataFolder(), "Song.nbs")); or Song s = NBSDecoder.parse(new File("/plugins/myplugin/Song.nbs"));
Step 2:
Create a player for the song
SongPlayer sp = new RadioSongPlayer(s);
Step 3:
define if the song should end when no one listens to it
sp.setAutoDestroy(true);
Step 4:
Add players to Song
sp.addPlayer(e.getPlayer());
Step 5:
Play song
sp.setPlaying(true);
GitHub
Contribute now and help us to update and improve NoteBlockAPI!
https:github.com/xxmicloxx/NoteBlockAPI
Nice you guys pushed an update :)
Can you add the source code to your side, I want to play music at one point for all players. s.playatcor((double)10.5(double)-20.5,(double)30.5); Great work!
Oops sorry work great, i just called a class of my Package SongEndEvent. Great work guys !
Hi ! is the SongEndEvent work for anyone ? it don't work for me :/ ( 1.6.4 ) Thanks :)
Can I repeat my songs? I didn't found something.
@Rocketboy901
s.addPlayer(Bukkit.getPlayer(args[1]));
I try to add players using:
s.addPlayer(args[1]);
But I get:
The method addPlayer(Player) in the type Song is not applicable for the arguments (String)
@theyanay5
Read "how to use"
tutorial for use the API?
@FR34KYN01535
linked
Hi! BAMradio 1.5 is now using your API aswell! Check it out: http://dev.bukkit.org/bukkit-mods/bamradio/
Great work on this API! Keep it up! :)
Hello again ;D
I wrote now a small plugin for all those people who don't want to learn Java. It's really simple and i would appreciate it if you could add it to the "Plugins that use NoteblockAPI"
Plugin:Plugin Page (still Approval needed :)
Thanks in Advance!
@mcsorley
you must add "depend: [NoteBlockAPI]" to yours plugin plugin.yml
and yes you need a new song object for every file
Wow this is a great plugin i realy like the concept :D Im gona use it on my server for sure if im able to get it work lol
When u said: add this line to your plugin.yml: plugins.yml in the NoteBlockAPI.jar ?
di i have to make one line for each sond ?
Song s = NBSDecoder.parse(new File("/plugins/myplugin/selda1.nbs")); Song s = NBSDecoder.parse(new File("/plugins/myplugin/zelda2.nbs")); Song s = NBSDecoder.parse(new File("/plugins/myplugin/zelda3.nbs"));
sry for the noob question
This is super awesome!!! What you need is a website where people can upload and share their creations with your Note Block Studio program. GREAT JOB!
@BillyGalbreath
Adding config.yml right now.
@Schwuck3le
Adding SongEndEvent right now, too.
@Schwuck3le
hi, you can shuffle the song by your own, and yes, we will implement the SongEndEvent soon
@pyrollamasteak
what do you mean? create the .nbs file or parse the .nbs file.....
if you look in the post, you will seee how to parse the nbs file
Thanks alot! It was very easy to use, but is there a way to shuffle the Song or is there an EventHandler for the SongEnd Event?
Thanks in Advance, Schwuck3le