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 @NonNull PathdataFolder(@NonNull Extension extension)Gets the givenExtension's data folder.protected abstract @NonNull ExtensionDescriptiondescription(@NonNull Extension extension)Gets the givenExtension'sExtensionDescription.protected abstract @NonNull ExtensionEventBusGets the givenExtension'sExtensionEventBus.protected abstract booleanGets if the givenExtensionis enabled.protected abstract voidloadAllExtensions(@NonNull ExtensionManager extensionManager)Loads all extensions.protected abstract @NonNull ExtensionLoggerGets theExtensionLoggerfor the givenExtension.protected voidregister(@NonNull Extension extension, @NonNull ExtensionManager extensionManager)Registers the givenExtensionwith the givenExtensionManager.protected abstract voidsetEnabled(@NonNull 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
-