Detect plugin files

Co-authored-by: sigonasr2 <sigonasr2@gmail.com>
main
sigonasr2, Sig, Sigo 2 years ago committed by GitHub
parent 5a8b2d96dd
commit 392b731234
  1. 3
      plugins/TestPlugin.java
  2. 16
      src/sig/PluginLoader.java
  3. 2
      src/sig/SigsUniverse.java

@ -0,0 +1,3 @@
public class TestPlugin {
}

@ -0,0 +1,16 @@
package sig;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
public class PluginLoader {
public static void LoadPlugins() {
Path p = Path.of("..","plugins");
try {
Files.walk(p).filter((f)->Files.isRegularFile(f)).forEach((f)->{System.out.println("Found "+f);});
} catch (IOException e) {
e.printStackTrace();
}
}
}

@ -2,6 +2,6 @@ package sig;
public class SigsUniverse {
public static void main(String[] args) {
System.out.println("Hello World!");
PluginLoader.LoadPlugins();
}
}

Loading…
Cancel
Save