Package de.geolykt.starloader.mod

# Class ExtensionManager

java.lang.Object
de.geolykt.starloader.mod.ExtensionManager

public class ExtensionManager extends Object

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final org.slf4j.Logger`
  `LOGGER`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ExtensionManager()`
  Deprecated.
  `ExtensionManager(@NotNull Path mavenCacheDir)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `@Nullable Extension`
  `getExtension(@NotNull String name)`
  `@NotNull List<Extension>`
  `getExtensions()`
  `void`
  `loadExtensions(List<@NotNull ? extends ExtensionPrototype> extensionCandidates)`
  `@NotNull MinestomExtensionClassLoader`
  `newClassLoader(@NotNull DiscoveredExtension extension)`
  Creates a new class loader for the given extension.
  `void`
  `reload(String extensionName)`
  `void`
  `shutdown()`
  Shutdowns all the extensions by unloading them.
  `void`
  `unloadExtension(String extensionName)`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### LOGGER

    @Internal public static final org.slf4j.Logger LOGGER

- ## Constructor Details

  - ### ExtensionManager

    @Deprecated @ScheduledForRemoval(inVersion="5.0.0") public ExtensionManager()
    Deprecated.

  - ### ExtensionManager

    public ExtensionManager(@NotNull @NotNull Path mavenCacheDir)

- ## Method Details

  - ### loadExtensions

    public void loadExtensions(List<@NotNull ? extends ExtensionPrototype> extensionCandidates)

  - ### newClassLoader

    @NotNull public @NotNull MinestomExtensionClassLoader newClassLoader(@NotNull @NotNull DiscoveredExtension extension)
    Creates a new class loader for the given extension. Will add the new loader as a child of all its dependencies' loaders.
    Parameters:
      `extension` - The extension that should own the classloader
    Since:
      4.0.0-20230701

  - ### getExtensions

    @NotNull public @NotNull List<Extension> getExtensions()

  - ### getExtension

    @Nullable public @Nullable Extension getExtension(@NotNull @NotNull String name)

  - ### reload

    public void reload(String extensionName)

  - ### unloadExtension

    public void unloadExtension(String extensionName)

  - ### shutdown

    public void shutdown()
    Shutdowns all the extensions by unloading them.