Class ExtensionLoader
java.lang.Object
org.geysermc.geyser.api.extension.ExtensionLoader
The extension loader is responsible for loading, unloading, enabling and disabling extensions
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract PathdataFolder(Extension extension) Gets the givenExtension's data folder.protected abstract ExtensionDescriptiondescription(Extension extension) Gets the givenExtension'sExtensionDescription.protected abstract ExtensionEventBusGets the givenExtension'sExtensionEventBus.protected abstract booleanGets if the givenExtensionis enabled.protected abstract voidloadAllExtensions(ExtensionManager extensionManager) Loads all extensions.protected abstract ExtensionLoggerGets theExtensionLoggerfor the givenExtension.protected voidregister(Extension extension, ExtensionManager extensionManager) Registers the givenExtensionwith the givenExtensionManager.protected abstract voidsetEnabled(Extension extension, boolean enabled) Sets if the givenExtensionis enabled.
-
Constructor Details
-
ExtensionLoader
public ExtensionLoader()
-
-
Method Details
-
isEnabled
Gets if the givenExtensionis enabled.- Parameters:
extension- the extension- Returns:
- if the extension is enabled
-
setEnabled
Sets if the givenExtensionis enabled.- Parameters:
extension- the extension to enableenabled- if the extension should be enabled
-
dataFolder
Gets the givenExtension's data folder.- Parameters:
extension- the extension- Returns:
- the data folder of the given extension
-
description
Gets the givenExtension'sExtensionDescription.- Parameters:
extension- the extension- Returns:
- the description of the given extension
-
eventBus
Gets the givenExtension'sExtensionEventBus.- Parameters:
extension- the extension- Returns:
- the extension's event bus
-
logger
Gets theExtensionLoggerfor the givenExtension.- Parameters:
extension- the extension- Returns:
- the extension logger for the given extension
-
loadAllExtensions
Loads all extensions.- Parameters:
extensionManager- the extension manager
-
register
Registers the givenExtensionwith the givenExtensionManager.- Parameters:
extension- the extensionextensionManager- the extension manager
-