Interface LuckPermsPlugin

All Known Implementing Classes:
AbstractLuckPermsPlugin

public interface LuckPermsPlugin
Main internal interface for LuckPerms plugins, providing the base for abstraction throughout the project. All plugin platforms implement this interface.
  • Method Details

    • getBootstrap

      LuckPermsBootstrap getBootstrap()
      Gets the bootstrap plugin instance
      Returns:
      the bootstrap plugin
    • getUserManager

      UserManager<? extends User> getUserManager()
      Gets the user manager instance for the platform
      Returns:
      the user manager
    • getGroupManager

      GroupManager<? extends Group> getGroupManager()
      Gets the group manager instance for the platform
      Returns:
      the group manager
    • getTrackManager

      TrackManager<? extends Track> getTrackManager()
      Gets the track manager instance for the platform
      Returns:
      the track manager
    • getConfiguration

      LuckPermsConfiguration getConfiguration()
      Gets the plugin's configuration
      Returns:
      the plugin config
    • getStorage

      Storage getStorage()
      Gets the primary data storage instance. This is likely to be wrapped with extra layers for caching, etc.
      Returns:
      the storage handler instance
    • getMessagingService

      Optional<InternalMessagingService> getMessagingService()
      Gets the messaging service.
      Returns:
      the messaging service
    • setMessagingService

      void setMessagingService(InternalMessagingService service)
      Sets the messaging service.
      Parameters:
      service - the service
    • getLogger

      PluginLogger getLogger()
      Gets a wrapped logger instance for the platform.
      Returns:
      the plugin's logger
    • getEventDispatcher

      EventDispatcher getEventDispatcher()
      Gets the event dispatcher
      Returns:
      the event dispatcher
    • getApiProvider

      LuckPermsApiProvider getApiProvider()
      Returns the class implementing the LuckPermsAPI on this platform.
      Returns:
      the api
    • getExtensionManager

      SimpleExtensionManager getExtensionManager()
      Gets the extension manager.
      Returns:
      the extension manager
    • getCommandManager

      CommandManager getCommandManager()
      Gets the command manager
      Returns:
      the command manager
    • getConnectionListener

      AbstractConnectionListener getConnectionListener()
      Gets the connection listener.
      Returns:
      the connection listener
    • getTranslationManager

      TranslationManager getTranslationManager()
      Gets the instance providing locale translations for the plugin
      Returns:
      the translation manager
    • getTranslationRepository

      TranslationRepository getTranslationRepository()
      Gets the translation repository
      Returns:
      the translation repository
    • getDependencyManager

      DependencyManager getDependencyManager()
      Gets the dependency manager for the plugin
      Returns:
      the dependency manager
    • getContextManager

      ContextManager<?,?> getContextManager()
      Gets the context manager. This object handles context accumulation for all players on the platform.
      Returns:
      the context manager
    • getInheritanceGraphFactory

      InheritanceGraphFactory getInheritanceGraphFactory()
      Gets the inheritance handler
      Returns:
      the inheritance handler
    • getCalculatorFactory

      CalculatorFactory getCalculatorFactory()
      Gets the class responsible for constructing PermissionCalculators on this platform.
      Returns:
      the permission calculator factory
    • getVerboseHandler

      VerboseHandler getVerboseHandler()
      Gets the verbose debug handler instance.
      Returns:
      the debug handler instance
    • getPermissionRegistry

      PermissionRegistry getPermissionRegistry()
      Gets the permission registry for the platform.
      Returns:
      the permission registry
    • getLogDispatcher

      LogDispatcher getLogDispatcher()
      Gets the log dispatcher running on the platform
      Returns:
      the log dispatcher
    • getFileWatcher

      Optional<FileWatcher> getFileWatcher()
      Gets the file watcher running on the platform
      Returns:
      the file watcher
    • getBytebin

      BytebinClient getBytebin()
      Gets the bytebin instance in use by platform.
      Returns:
      the bytebin instance
    • getBytesocks

      BytesocksClient getBytesocks()
      Gets the bytesocks instance in use by platform.
      Returns:
      the bytesocks instance
    • getWebEditorStore

      WebEditorStore getWebEditorStore()
      Gets the web editor store
      Returns:
      the web editor store
    • runHealthCheck

      net.luckperms.api.platform.Health runHealthCheck()
      Runs a health check for the plugin.
      Returns:
      the result of the healthcheck
    • getQueryOptionsForUser

      Optional<net.luckperms.api.query.QueryOptions> getQueryOptionsForUser(User user)
      Gets a calculated context instance for the user using the rules of the platform.
      Parameters:
      user - the user instance
      Returns:
      a contexts object, or null if one couldn't be generated
    • lookupUniqueId

      Optional<UUID> lookupUniqueId(String username)
      Lookup a uuid from a username.
      Parameters:
      username - the username to lookup
      Returns:
      an optional uuid, if found
    • lookupUsername

      Optional<String> lookupUsername(UUID uniqueId)
      Lookup a username from a uuid.
      Parameters:
      uniqueId - the uuid to lookup
      Returns:
      an optional username, if found
    • testUsernameValidity

      boolean testUsernameValidity(String username)
      Tests whether the given username is valid.
      Parameters:
      username - the username
      Returns:
      true if valid
    • getOnlineSenders

      Stream<Sender> getOnlineSenders()
      Gets a list of online Senders on the platform
      Returns:
      a List of senders online on the platform
    • getConsoleSender

      Sender getConsoleSender()
      Gets the console.
      Returns:
      the console sender of the instance
    • getExtraCommands

      default List<Command<?>> getExtraCommands()
    • getSyncTaskBuffer

      SyncTask.Buffer getSyncTaskBuffer()
      Gets the sync task buffer of the platform, used for scheduling and running sync tasks.
      Returns:
      the sync task buffer instance
    • performPlatformDataSync

      default void performPlatformDataSync()
      Called at the end of the sync task.