Package net.minestom.server.extensions
Class ExtensionManager
java.lang.Object
net.minestom.server.extensions.ExtensionManager
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription@Nullable Extension
getExtension
(@NotNull String name) @NotNull Path
@NotNull File
@NotNull Collection
<Extension> void
gotoInit()
void
void
boolean
hasExtension
(@NotNull String name) boolean
loadDynamicExtension
(@NotNull File jarFile) void
setExtensionDataRoot
(@NotNull Path dataRoot) void
setLoadOnStartup
(boolean loadOnStartup) Used to specify if you want extensions to be loaded and initialized during startup.boolean
Gets if the extensions should be loaded during startup.void
shutdown()
Shutdowns all the extensions by unloading them.void
start()
-
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.
-