Plugin category: Misc Suggested Name: FileLister (meh) What I Want: Hey guys, I program in a little known language called Skript. We write skripts, that function almost like plugins. I'm basically requesting a plugin that, from a given directory listed in a config, can list files. We've never had a system for listing all the skripts (plugins) available to a server. I've got a long list of Skripts running on the server, and cannot actively view the list of them without going into the file system. If you want to be really fancy, it can be seperated into two categories, active and unactive (unactive files are preceded by a dash(I.E -MostFunGuyLovesYou.sk) Commands: /listskripts and /listskript Permissions: skript.list (or configurable in a config) When I'd like it by: Whenever you fine gents get around to it. <3 Pretty simple file structure, with some disabled ones thrown in as examples
I currently dont have time to write this but i can help out people who are going to want to make to this or at least try. Skript has a few static methods that you can use to get its instance (its faster then going through the PluginManager) Here is an EXTREMELY simple way to get a list of all scripts that Skript uses to store/load all the scripts in is possession. Code:java File scriptsFolder = new File(Skript.getInstance().getDataFolder(), Skript.SCRIPTSFOLDER + File.separator); if (scriptsFolder.isDirectory()) { for (File f : scriptsFolder.listFiles()) { System.out.println(f.getName()); }} Of course you would have to modify it to print all the files into chat. Doing it this way requires you to import The Skript jar into your project, or add as a dependency using maven.
MostFunGuy done for you.. Download here: http://www.filedropper.com/showdownload.php/listskript Config file: Code:java Settings: SkriptDirectory: "plugins/other" SkriptExtension: ".sk" InactiveSkriptStart: "-" Set the 'SkriptDirectory' to the directory the skripts are kept. Set 'SkriptExtension' to the file extension for the skripts Set 'InactiveSkriptStart' to the character the inactive skripts start with. Which i think you said was a hyphen. Commands: - Run ingame: /list-skript Permissions: - None Let me know any issues or you want other commands/permissions added. Just PM Me.
Awesome! I posted an example picture of how the directory looks to help you guys, but it seems to still be "under moderator approval". Well guys, thank you very much for the quick turnaround, I shall test this tonight (Im at work).
just saw the part about permissions ill add them shortly for you *Note to self - read tbe whole post next time lol
Eh, the permission was sort of a sprinkle on it. I don't intend to use it, but other Skripters might want it. I linked them this thread, so others may DL it as well.
MostFunGuy yeh no worries..im going to add the permission..and ill add other commands for listing inactive and active skripts themselves, so something like: /list-skript active and /list-skript inactive