Minix-Platform-Loader/src/main/java/dev/racci/minix/platforms/MinixPlatforms.java
/**
     * Loads a file matching a predicate out of the plugin folder.
     */
Loads a file matching a predicate out of the plugin folder.
Loads a file matching a predicate out of the plugin folder .
public static void load(@NotNull Plugin plugin, Predicate<File> predicate) throws ReflectiveOperationException {
        File[] files = plugin.getDataFolder().getParentFile().listFiles();
        if (files == null) return;
        Optional<File> injectFile = Arrays.stream(files)
                .filter(predicate)
                .findFirst();
        if (injectFile.isEmpty()) return;
        LibraryLoaderInjector.inject(plugin, injectFile.get());
    }
public static void load ( @ NotNull Plugin plugin , Predicate < File > predicate ) throws ReflectiveOperationException { File [ ] files = plugin . getDataFolder ( ) . getParentFile ( ) . listFiles ( ) ; if ( files == null ) return ; Optional < File > injectFile = Arrays . stream ( files ) . filter ( predicate ) . findFirst ( ) ; if ( injectFile . isEmpty ( ) ) return ; LibraryLoaderInjector . inject ( plugin , injectFile . get ( ) ) ; }
Loads a file matching a predicate out of the plugin folder.
Loads a file matching a predicate out of the plugin folder .