public <T> LoaderBootstrap instantiatePlugin(String bootstrapClass, Class<T> loaderPluginType, T loaderPlugin) throws LoadingException {
        Class<? extends LoaderBootstrap> plugin;
        try {
            plugin = loadClass(bootstrapClass).asSubclass(LoaderBootstrap.class);
        } catch (ReflectiveOperationException e) {
            throw new LoadingException("Unable to load bootstrap class", e);
        }

        Constructor<? extends LoaderBootstrap> constructor;
        try {
            constructor = plugin.getConstructor(loaderPluginType);
        } catch (ReflectiveOperationException e) {
            throw new LoadingException("Unable to get bootstrap constructor", e);
        }

        try {
            return constructor.newInstance(loaderPlugin);
        } catch (ReflectiveOperationException e) {
            throw new LoadingException("Unable to create bootstrap plugin instance", e);
        }
    }
Creates a new plugin instance.

@param bootstrapClass the name of the bootstrap plugin class
@param loaderPluginType the type of the loader plugin, the only parameter of the bootstrap
                        plugin constructor
@param loaderPlugin the loader plugin instance
@param <T> the type of the loader plugin
@return the instantiated bootstrap plugin
common/loader-utils/src/main/java/me/lucko/luckperms/common/loader/JarInJarClassLoader.java