Interface LibraryResolver


public interface LibraryResolver
Downloads the libraries the plugin does not bundle and loads them at runtime, relocating their packages so they cannot clash with anything the server already has.
  • Method Summary

    Modifier and Type
    Method
    Description
    default List<String>
    The adventure artifacts fetched when the platform does not supply them.
    com.alessiodp.libby.classloader.IsolatedClassLoader
    The class loader holding one isolated group of libraries, so versions that would otherwise conflict can live side by side.
    default List<String>
    The PacketEvents artifacts fetched when the platform does not supply them.
    void
    Downloads and loads every library the current platform
    void
    loadLibraries(List<com.alessiodp.libby.Library> libraries)
    Downloads and loads several libraries.
    void
    loadLibrary(com.alessiodp.libby.Library library)
    Downloads and loads a single library.
    void
    Registers the repositories libraries are downloaded from.
  • Method Details

    • getAdventureArtifactIds

      default List<String> getAdventureArtifactIds()
      The adventure artifacts fetched when the platform does not supply them.
      Returns:
      the artifact ids
    • getPacketEventsArtifactIds

      default List<String> getPacketEventsArtifactIds()
      The PacketEvents artifacts fetched when the platform does not supply them.
      Returns:
      the artifact ids
    • loadLibrary

      void loadLibrary(com.alessiodp.libby.Library library)
      Downloads and loads a single library.
      Parameters:
      library - the library to load
    • loadLibraries

      void loadLibraries(List<com.alessiodp.libby.Library> libraries)
      Downloads and loads several libraries.
      Parameters:
      libraries - the libraries to load
    • loadLibraries

      void loadLibraries()
      Downloads and loads every library the current platform
    • getIsolatedClassLoaderById

      com.alessiodp.libby.classloader.IsolatedClassLoader getIsolatedClassLoaderById(@NotNull @NotNull String loaderId)
      The class loader holding one isolated group of libraries, so versions that would otherwise conflict can live side by side.
      Parameters:
      loaderId - the group id
      Returns:
      the class loader for that group
    • resolveRepositories

      void resolveRepositories()
      Registers the repositories libraries are downloaded from.