Package xyz.srnyx.annoyingapi.library
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
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
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 Summary
Modifier and TypeMethodDescriptiondefault @NotNull StringgetId()The unique ID of the library (used for identification withAnnoyingLibraryManager.getIsolatedClassLoaderOf(AnnoyingLibrary))default net.byteflux.libby.Library.BuilderSets theIDof the library and returns the builder@NotNull Supplier<net.byteflux.libby.Library.Builder> The supplier of the builder to create the library withdefault net.byteflux.libby.Library.BuildergetLibraryWithRelocations(@NotNull AnnoyingPlugin plugin) RunsgetLibrary()and appliesthe relocationsto the library@NotNull Function<AnnoyingPlugin, Collection<net.byteflux.libby.relocation.Relocation>> The relocations to apply to the library
-
Method Details
-
getId
The unique ID of the library (used for identification withAnnoyingLibraryManager.getIsolatedClassLoaderOf(AnnoyingLibrary))- Returns:
- the unique ID of the library
-
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 theIDof 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) RunsgetLibrary()and appliesthe relocationsto the library- Parameters:
plugin- the plugin to apply the relocations with- Returns:
- the builder to create the library with relocations
-