Package me.lucko.luckperms.common.plugin
Class AbstractLuckPermsPlugin
java.lang.Object
me.lucko.luckperms.common.plugin.AbstractLuckPermsPlugin
- All Implemented Interfaces:
LuckPermsPlugin
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected DependencyManagerfinal voiddisable()final voidenable()Returns the class implementing the LuckPermsAPI on this platform.Gets the bytebin instance in use by platform.Gets the bytesocks instance in use by platform.Gets the class responsible for constructing PermissionCalculators on this platform.Gets the plugin's configurationGets the dependency manager for the pluginGets the event dispatcherGets the extension manager.Gets the file watcher running on the platformprotected Set<Dependency> okhttp3.OkHttpClientGets the inheritance handlerGets the log dispatcher running on the platformGets a wrapped logger instance for the platform.Gets the messaging service.Gets the permission registry for the platform.static StringGets the primary data storage instance.Gets the sync task buffer of the platform, used for scheduling and running sync tasks.Gets the instance providing locale translations for the pluginGets the translation repositoryGets the verbose debug handler instance.Gets the web editor storefinal voidload()Performs the initial actions to load the pluginlookupUniqueId(String username) Lookup a uuid from a username.lookupUsername(UUID uniqueId) Lookup a username from a uuid.protected abstract voidprotected abstract CalculatorFactoryprotected abstract ConfigurationAdapterprotected abstract AbstractEventBus<?> provideEventBus(LuckPermsApiProvider apiProvider) protected abstract MessagingFactory<?> protected abstract voidregisterApiOnPlatform(net.luckperms.api.LuckPerms api) protected abstract voidprotected voidprotected abstract voidprotected voidprotected PathresolveConfig(String fileName) net.luckperms.api.platform.HealthRuns a health check for the plugin.voidsetMessagingService(InternalMessagingService messagingService) Sets the messaging service.protected abstract voidprotected abstract voidprotected abstract voidprotected abstract voidbooleantestUsernameValidity(String username) Tests whether the given username is valid.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface me.lucko.luckperms.common.plugin.LuckPermsPlugin
getBootstrap, getCommandManager, getConnectionListener, getConsoleSender, getContextManager, getExtraCommands, getGroupManager, getOnlineSenders, getQueryOptionsForUser, getTrackManager, getUserManager, performPlatformDataSync
-
Constructor Details
-
AbstractLuckPermsPlugin
public AbstractLuckPermsPlugin()
-
-
Method Details
-
load
public final void load()Performs the initial actions to load the plugin -
enable
public final void enable() -
disable
public final void disable() -
createDependencyManager
-
getGlobalDependencies
-
registerHousekeepingTasks
protected void registerHousekeepingTasks() -
setupSenderFactory
protected abstract void setupSenderFactory() -
provideConfigurationAdapter
-
registerPlatformListeners
protected abstract void registerPlatformListeners() -
provideMessagingFactory
-
registerCommands
protected abstract void registerCommands() -
setupManagers
protected abstract void setupManagers() -
provideCalculatorFactory
-
setupContextManager
protected abstract void setupContextManager() -
setupPlatformHooks
protected abstract void setupPlatformHooks() -
provideEventBus
-
registerApiOnPlatform
protected abstract void registerApiOnPlatform(net.luckperms.api.LuckPerms api) -
performFinalSetup
protected abstract void performFinalSetup() -
removePlatformHooks
protected void removePlatformHooks() -
resolveConfig
-
getLogger
Description copied from interface:LuckPermsPluginGets a wrapped logger instance for the platform.- Specified by:
getLoggerin interfaceLuckPermsPlugin- Returns:
- the plugin's logger
-
setMessagingService
Description copied from interface:LuckPermsPluginSets the messaging service.- Specified by:
setMessagingServicein interfaceLuckPermsPlugin- Parameters:
messagingService- the service
-
runHealthCheck
public net.luckperms.api.platform.Health runHealthCheck()Description copied from interface:LuckPermsPluginRuns a health check for the plugin.- Specified by:
runHealthCheckin interfaceLuckPermsPlugin- Returns:
- the result of the healthcheck
-
lookupUniqueId
Description copied from interface:LuckPermsPluginLookup a uuid from a username.- Specified by:
lookupUniqueIdin interfaceLuckPermsPlugin- Parameters:
username- the username to lookup- Returns:
- an optional uuid, if found
-
lookupUsername
Description copied from interface:LuckPermsPluginLookup a username from a uuid.- Specified by:
lookupUsernamein interfaceLuckPermsPlugin- Parameters:
uniqueId- the uuid to lookup- Returns:
- an optional username, if found
-
testUsernameValidity
Description copied from interface:LuckPermsPluginTests whether the given username is valid.- Specified by:
testUsernameValidityin interfaceLuckPermsPlugin- Parameters:
username- the username- Returns:
- true if valid
-
getDependencyManager
Description copied from interface:LuckPermsPluginGets the dependency manager for the plugin- Specified by:
getDependencyManagerin interfaceLuckPermsPlugin- Returns:
- the dependency manager
-
getTranslationManager
Description copied from interface:LuckPermsPluginGets the instance providing locale translations for the plugin- Specified by:
getTranslationManagerin interfaceLuckPermsPlugin- Returns:
- the translation manager
-
getVerboseHandler
Description copied from interface:LuckPermsPluginGets the verbose debug handler instance.- Specified by:
getVerboseHandlerin interfaceLuckPermsPlugin- Returns:
- the debug handler instance
-
getPermissionRegistry
Description copied from interface:LuckPermsPluginGets the permission registry for the platform.- Specified by:
getPermissionRegistryin interfaceLuckPermsPlugin- Returns:
- the permission registry
-
getLogDispatcher
Description copied from interface:LuckPermsPluginGets the log dispatcher running on the platform- Specified by:
getLogDispatcherin interfaceLuckPermsPlugin- Returns:
- the log dispatcher
-
getConfiguration
Description copied from interface:LuckPermsPluginGets the plugin's configuration- Specified by:
getConfigurationin interfaceLuckPermsPlugin- Returns:
- the plugin config
-
getHttpClient
public okhttp3.OkHttpClient getHttpClient() -
getBytebin
Description copied from interface:LuckPermsPluginGets the bytebin instance in use by platform.- Specified by:
getBytebinin interfaceLuckPermsPlugin- Returns:
- the bytebin instance
-
getBytesocks
Description copied from interface:LuckPermsPluginGets the bytesocks instance in use by platform.- Specified by:
getBytesocksin interfaceLuckPermsPlugin- Returns:
- the bytesocks instance
-
getWebEditorStore
Description copied from interface:LuckPermsPluginGets the web editor store- Specified by:
getWebEditorStorein interfaceLuckPermsPlugin- Returns:
- the web editor store
-
getTranslationRepository
Description copied from interface:LuckPermsPluginGets the translation repository- Specified by:
getTranslationRepositoryin interfaceLuckPermsPlugin- Returns:
- the translation repository
-
getFileWatcher
Description copied from interface:LuckPermsPluginGets the file watcher running on the platform- Specified by:
getFileWatcherin interfaceLuckPermsPlugin- Returns:
- the file watcher
-
getStorage
Description copied from interface:LuckPermsPluginGets the primary data storage instance. This is likely to be wrapped with extra layers for caching, etc.- Specified by:
getStoragein interfaceLuckPermsPlugin- Returns:
- the storage handler instance
-
getMessagingService
Description copied from interface:LuckPermsPluginGets the messaging service.- Specified by:
getMessagingServicein interfaceLuckPermsPlugin- Returns:
- the messaging service
-
getSyncTaskBuffer
Description copied from interface:LuckPermsPluginGets the sync task buffer of the platform, used for scheduling and running sync tasks.- Specified by:
getSyncTaskBufferin interfaceLuckPermsPlugin- Returns:
- the sync task buffer instance
-
getInheritanceGraphFactory
Description copied from interface:LuckPermsPluginGets the inheritance handler- Specified by:
getInheritanceGraphFactoryin interfaceLuckPermsPlugin- Returns:
- the inheritance handler
-
getCalculatorFactory
Description copied from interface:LuckPermsPluginGets the class responsible for constructing PermissionCalculators on this platform.- Specified by:
getCalculatorFactoryin interfaceLuckPermsPlugin- Returns:
- the permission calculator factory
-
getApiProvider
Description copied from interface:LuckPermsPluginReturns the class implementing the LuckPermsAPI on this platform.- Specified by:
getApiProviderin interfaceLuckPermsPlugin- Returns:
- the api
-
getExtensionManager
Description copied from interface:LuckPermsPluginGets the extension manager.- Specified by:
getExtensionManagerin interfaceLuckPermsPlugin- Returns:
- the extension manager
-
getEventDispatcher
Description copied from interface:LuckPermsPluginGets the event dispatcher- Specified by:
getEventDispatcherin interfaceLuckPermsPlugin- Returns:
- the event dispatcher
-
getPluginName
-