How do I get all the files in the plugin resources and save. I know that you can get them using saveResource("file") , but if there will be many files, I need a method that will take all the files.
Learn using stackoverflow and searching Code (Java): CodeSource src = MyClass.class.getProtectionDomain().getCodeSource(); if (src != null) { URL jar = src.getLocation(); ZipInputStream zip = new ZipInputStream(jar.openStream()); while(true) { ZipEntry e = zip.getNextEntry(); if (e == null) break; String name = e.getName(); if (name.startsWith("path/to/your/dir/")) { /* Do something with this entry. */ ... } } } You can try with this