Interface AnnoyingLibrary

All Known Implementing Classes:
RuntimeLibrary

public interface AnnoyingLibrary
A library that can be loaded into the server's classpath or into an isolated classloader using AnnoyingLibraryManager
Not all libraries are downloaded/loaded at the same time, only once needed!

If you are implementing this interface for a class (rather than an enum), you must override getId()!
  • Method Details

    • getId

      @NotNull default @NotNull String getId()
      The unique ID of the library (used for identification with AnnoyingLibraryManager.getIsolatedClassLoaderOf(AnnoyingLibrary))
      Returns:
      the unique ID of the library
    • getLibrarySupplier

      @NotNull @NotNull Supplier<net.byteflux.libby.Library.Builder> getLibrarySupplier()
      The supplier of the builder to create the library with
      Returns:
      a supplier that gives a new builder to create the library with
    • getRelocations

      @NotNull @NotNull Function<AnnoyingPlugin,Collection<net.byteflux.libby.relocation.Relocation>> getRelocations()
      The relocations to apply to the library
      Returns:
      a function that gives a collection of relocations to apply to the library
    • getLibrary

      @NotNull default net.byteflux.libby.Library.Builder getLibrary()
      Sets the ID of the library and returns the builder
      Returns:
      the builder to create the library with
    • getLibraryWithRelocations

      @NotNull default net.byteflux.libby.Library.Builder getLibraryWithRelocations(@NotNull @NotNull AnnoyingPlugin plugin)
      Runs getLibrary() and applies the relocations to the library
      Parameters:
      plugin - the plugin to apply the relocations with
      Returns:
      the builder to create the library with relocations