Solved Playing .nbs files in-game?

Discussion in 'Spigot Plugin Development' started by Igasi, Apr 15, 2017.

  1. So I am working on a server, right? And to keep it up, one of the ranks cosmetics you unlock is in-game music. Also, music would play when you complete something. Only problem being that I have no idea how to play music in-game.
     
  2. #2 ExpDev, Apr 15, 2017
    Last edited: Apr 15, 2017
    • Useful Useful x 1
  3. Thanks! Also, I already use Minecraft Note Block Studio so we're on the same page
     
  4. Alright the information is a bit vague...

    Would "/plugins/myplugin/Song.nbs" be the plugins folder in my "bukkit server" folder?
     
  5. That would be your plugin's folder yes. You can either use Plugin#getDataFolder() or just simply type the path manually which is what you have right there. I would suggest generating a new folder where you would store your songs. So for example:

    "plugins/myplugin/songs/Song.nbs"
    And just a note, use all lower-- or uppercase for the song names, it is then much more convenient. So
    "plugins/myplugin/songs/song.nbs"
     
    • Like Like x 1
  6. yea, id create a folder tho to hold the indvidual files of one type, such as songs be the folder name. So, plugins/myplugin/YOURFOLDERHERE/Song.nbs
     
    • Like Like x 1
  7. Oh, one of the devs tweeted that they are working on expanding noteblocks, this may be something to look into or wait for.
     
  8. What do you mean? How is that relevant?
     
  9. I think he was refering to the noteblock api. Note sure tho
     
  10. No. He was wondering if something like the Noteblock API existed, or how to do what Noteblock API is doing (which would be more complicated for his tier).