Class ExtensionManager

java.lang.Object
net.minestom.server.extensions.ExtensionManager

public class ExtensionManager extends Object
  • Field Details

  • Constructor Details

    • ExtensionManager

      public ExtensionManager(ServerProcess serverProcess)
  • Method Details

    • shouldLoadOnStartup

      public boolean shouldLoadOnStartup()
      Gets if the extensions should be loaded during startup.

      Default value is 'true'.

      Returns:
      true if extensions are loaded in MinecraftServer.start(java.net.SocketAddress)
    • setLoadOnStartup

      public void setLoadOnStartup(boolean loadOnStartup)
      Used to specify if you want extensions to be loaded and initialized during startup.

      Only useful before the server start.

      Parameters:
      loadOnStartup - true to load extensions on startup, false to do nothing
    • getExtensionFolder

      @NotNull public @NotNull File getExtensionFolder()
    • getExtensionDataRoot

      @NotNull public @NotNull Path getExtensionDataRoot()
    • setExtensionDataRoot

      public void setExtensionDataRoot(@NotNull @NotNull Path dataRoot)
    • getExtensions

      @NotNull public @NotNull Collection<Extension> getExtensions()
    • getExtension

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

      public boolean hasExtension(@NotNull @NotNull String name)
    • start

      @Internal public void start()
    • gotoPreInit

      @Internal public void gotoPreInit()
    • gotoInit

      @Internal public void gotoInit()
    • gotoPostInit

      @Internal public void gotoPostInit()
    • loadDynamicExtension

      public boolean loadDynamicExtension(@NotNull @NotNull File jarFile) throws FileNotFoundException
      Throws:
      FileNotFoundException
    • shutdown

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