Package net.minestom.server.extensions
Class ExtensionManager
java.lang.Object
net.minestom.server.extensions.ExtensionManager
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@Nullable ExtensiongetExtension(@NotNull String name) @NotNull Path@NotNull File@NotNull Collection<Extension> voidgotoInit()voidvoidbooleanhasExtension(@NotNull String name) booleanloadDynamicExtension(@NotNull File jarFile) voidsetExtensionDataRoot(@NotNull Path dataRoot) voidsetLoadOnStartup(boolean loadOnStartup) Used to specify if you want extensions to be loaded and initialized during startup.booleanGets if the extensions should be loaded during startup.voidshutdown()Shutdowns all the extensions by unloading them.voidstart()
-
Field Details
-
LOGGER
public static final org.slf4j.Logger LOGGER -
INDEV_CLASSES_FOLDER
- See Also:
-
INDEV_RESOURCES_FOLDER
- See Also:
-
-
Constructor Details
-
ExtensionManager
-
-
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
-
getExtensionDataRoot
-
setExtensionDataRoot
-
getExtensions
-
getExtension
-
hasExtension
-
start
@Internal public void start() -
gotoPreInit
@Internal public void gotoPreInit() -
gotoInit
@Internal public void gotoInit() -
gotoPostInit
@Internal public void gotoPostInit() -
loadDynamicExtension
- Throws:
FileNotFoundException
-
shutdown
public void shutdown()Shutdowns all the extensions by unloading them.
-