@Singleton public class ExtensionSvc extends java.lang.Object implements ExtensionService
ExtensionService
.ExtensionService.Holder
Constructor and Description |
---|
ExtensionSvc(PlanConfig config,
DBSystem dbSystem,
ServerInfo serverInfo,
Processing processing,
ExtensionRegister extensionRegister,
com.djrapitops.plugin.logging.console.PluginLogger logger,
com.djrapitops.plugin.logging.error.ErrorHandler errorHandler) |
Modifier and Type | Method and Description |
---|---|
void |
register() |
java.util.Optional<Caller> |
register(DataExtension extension)
Register your
DataExtension implementation. |
void |
registerExtensions() |
void |
unregister(DataExtension extension)
Unregister your
DataExtension implementation. |
void |
updatePlayerValues(ProviderValueGatherer gatherer,
java.util.UUID playerUUID,
java.lang.String playerName,
CallEvents event) |
void |
updatePlayerValues(java.util.UUID playerUUID,
java.lang.String playerName,
CallEvents event) |
void |
updateServerValues(CallEvents event) |
void |
updateServerValues(ProviderValueGatherer gatherer,
CallEvents event) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getInstance
@Inject public ExtensionSvc(PlanConfig config, DBSystem dbSystem, ServerInfo serverInfo, Processing processing, ExtensionRegister extensionRegister, com.djrapitops.plugin.logging.console.PluginLogger logger, com.djrapitops.plugin.logging.error.ErrorHandler errorHandler)
public void register()
public void registerExtensions()
public java.util.Optional<Caller> register(DataExtension extension)
ExtensionService
DataExtension
implementation.
You can use ExtensionExtractor.validateAnnotations()
in your Unit Tests to prevent IllegalArgumentExceptions here at runtime.
register
in interface ExtensionService
extension
- Your DataExtension implementation, see DataExtension
for requirements.Caller
that can be used to call for data update in Plan database manually - If the Optional is not present the user has disabled the extension in Plan config.public void unregister(DataExtension extension)
ExtensionService
DataExtension
implementation.
This method should be used if calling methods on the DataExtension suddenly becomes unavailable, due to plugin disable for example.
unregister
in interface ExtensionService
extension
- Your DataExtension implementation that was registered before.public void updatePlayerValues(java.util.UUID playerUUID, java.lang.String playerName, CallEvents event)
public void updatePlayerValues(ProviderValueGatherer gatherer, java.util.UUID playerUUID, java.lang.String playerName, CallEvents event)
public void updateServerValues(CallEvents event)
public void updateServerValues(ProviderValueGatherer gatherer, CallEvents event)