Class AnnoyingLibraryManager

  • All Implemented Interfaces:
    Annoyable

    public class AnnoyingLibraryManager
    extends net.byteflux.libby.BukkitLibraryManager
    implements Annoyable
    A library manager that can load libraries into the server's classpath or into an isolated classloader using RuntimeLibrary
    • Constructor Detail

      • AnnoyingLibraryManager

        public AnnoyingLibraryManager​(@NotNull
                                      @NotNull AnnoyingPlugin plugin,
                                      @NotNull
                                      @NotNull java.lang.String directoryName)
        Create a new AnnoyingLibraryManager for the plugin with a custom directory name
        Parameters:
        plugin - plugin
        directoryName - the name of the directory to store the libraries in
    • Method Detail

      • loadLibraryIsolated

        @NotNull
        public @NotNull net.byteflux.libby.classloader.IsolatedClassLoader loadLibraryIsolated​(@NotNull
                                                                                               @NotNull RuntimeLibrary library)
        Load a RuntimeLibrary into an isolated classloader
        Parameters:
        library - the library to load
        Returns:
        the isolated classloader containing the library
        See Also:
        loadLibrary(RuntimeLibrary)
      • getIsolatedClassLoaderOf

        @NotNull
        public @NotNull java.util.Optional<net.byteflux.libby.classloader.IsolatedClassLoader> getIsolatedClassLoaderOf​(@NotNull
                                                                                                                        @NotNull RuntimeLibrary library)
        Get the IsolatedClassLoader of a RuntimeLibrary
        Parameters:
        library - the library to get the classloader of
        Returns:
        the classloader of the library
      • isLoadedIsolated

        public boolean isLoadedIsolated​(@NotNull
                                        @NotNull RuntimeLibrary library)
        Check if a RuntimeLibrary is loaded in an isolated classloader
        Parameters:
        library - the library to check
        Returns:
        whether the library is loaded
        See Also:
        isLoaded(RuntimeLibrary)