Package xyz.srnyx.annoyingapi.library
Interface AnnoyingLibrary
-
- All Known Implementing Classes:
RuntimeLibrary
public interface AnnoyingLibraryA library that can be loaded into the server's classpath or into an isolated classloader usingAnnoyingLibraryManager
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 overridegetId()!
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default @NotNull java.lang.StringgetId()The unique ID of the library (used for identification withAnnoyingLibraryManager.getIsolatedClassLoaderOf(RuntimeLibrary))default net.byteflux.libby.Library.BuildergetLibrary()Sets theIDof the library and returns the builder@NotNull java.util.function.Supplier<net.byteflux.libby.Library.Builder>getLibrarySupplier()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 java.util.function.Function<AnnoyingPlugin,java.util.Collection<net.byteflux.libby.relocation.Relocation>>getRelocations()The relocations to apply to the library
-
-
-
Method Detail
-
getId
@NotNull default @NotNull java.lang.String getId()
The unique ID of the library (used for identification withAnnoyingLibraryManager.getIsolatedClassLoaderOf(RuntimeLibrary))- Returns:
- the unique ID of the library
-
getLibrarySupplier
@NotNull @NotNull java.util.function.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 java.util.function.Function<AnnoyingPlugin,java.util.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
-
-