Because I think making another post would be silly, I will ask question here - how would I go about scanning the folder plugins/MyPlugin/ and for every file there adding its name to an arraylist. Eg: If in that folder I have Song1.nbs Song2.nbs then if I was to run that method that scans and adds then print my arraylist I'd get {Song1.nbs, Song2.nbs} Old question Hey, I tried to make a .nbs file play once a user logs onto the server using NoteBlockAPI. Seems easy, 5 lines of code. Right? Well, I am facing an error that once I start the server there is as ClassNotFoundException - the class being part of the API. So I was wondering, what is the other way to play .nbs files found in plugins folder? (/plugins/pluginname/Song.nbs).
I cri, I forgot about the depend: [NoteBlockAPI] - really weird that it needs it. EDIT: Because I think making another post would be silly, I will ask question here - how would I go about scanning the folder plugins/MyPlugin/ and for every file there adding its name to an arraylist. Eg: If in that folder I have Song1.nbs Song2.nbs then if I was to run that method that scans and adds then print my arraylist I'd get {Song1.nbs, Song2.nbs} Aqua CrazyGuy3000
Code: File directory = new File(getDataFolder(), ""); for(File f : directory.listFiles()) { // each f.getName() ... } [/CODE\