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
@xFabi19
xFabi19, ich hatte gedacht es würde funktionieren, ich warte auf das Skript Addon von Nfell2009, und dachte das würde Klappen, (logischer weise) :P
Du kannst mich aber in Skype Adden, und ich könnte versuchen dir zu helfen.
@GraciaTv
Thanks GraciaTV
how did you mean this sp.setplaying(false); i Try it so
http://pastebin.com/2uFc9pyC
but Eclipse dont know what i mean with song9.setplaying(false); pls help me
@Nfell2009
Try
sp.setPlaying(false); or use the Code from BAMRadio :P
Greets.
How would I go about stopping a song that the player is listening to?
@michidk:
hi I need help. I created a Inventory with one Item. When you Click on the Item you start a Song. (Work all) I add a second Item to Stop the Song.(Work not)
Can anyone say me how i stop one Song?
Here is my code:
http://pastebin.com/v2U955bn
can anyone saw me how i can make this ?
Nice! Any ways to fix so you still can hear the song without that the music gets weird when you walk though? Please
when i installed NoteBlockAPI and ran it and did /plugins NoteBlockAPI was there but there was not NoteBlockAPI folder in my plugins folder help ;(
@jupitertree1
This isn't called in the main-thread. Thats called from the extra song-thread. NoteBlockAPI runs multithreaded
@McServerExpertDe
hmm yeah good idea, you can make a PR on Git to add this
Why would you sleep the main thread? It's crashed my server on several different occasions.
Please add something like
because
only returns the author who re-created the song in NoteBlockStudio.
Thanks
Can you pls add it :3 http://dev.bukkit.org/bukkit-plugins/joinmusik/
nice API add http://dev.bukkit.org/bukkit-plugins/joinmusik/ to the list
So I really want this for my hub but I have no idea how to code... Can you please help me :(
@WauloK
Hi,
Use the SongStoppedEvent:
https://github.com/xxmicloxx/NoteBlockAPI/blob/master/src/main/java/com/xxmicloxx/NoteBlockAPI/SongStoppedEvent.java
@FlameFlare9
yes, otherwise it won't play correctly
@impa789
this is not a plugin.
this is an API (http://en.wikipedia.org/wiki/Api)
if you want a plugin that plays .nbs files, look here:
http://dev.bukkit.org/bukkit-plugins/noteblockapi/#w-plugins-that-use-note-block-api
hi, i dont have a Plugins.yml file in my server :-3 can u help me? if u can msg me on skype i may be able to give you to link and information for the files and console and you can show me how to put the API in. i am trieing to use the DubstepGun plugin but it isnt workign rigth. i tried puting the api in my plugins folder and my game recognises it as a plugin but none of the .nbs files that are also in the plugin folder are playing. sorry if i am compleatly misimformed and i just wasted 30 seconds of you life.
I've got one question, do the .nbs files have to be compatible with minecraft, what I mean with compatible is that in the top right corner it has to be grenn?
To update you list. There is another plugin that uses this Dubstep Gun (Click)
I cant change this file to midi for .nbs
https://www.dropbox.com/s/xd68bdcycxffxwo/wherenoonegoes.mp3