Class ModuleLoader

java.lang.Object
eu.locklogin.api.module.plugin.javamodule.ModuleLoader

public final class ModuleLoader extends Object
LockLogin java module loader
  • Constructor Details

    • ModuleLoader

      public ModuleLoader()
  • Method Details

    • isLoaded

      public static boolean isLoaded(@Nullable @Nullable PluginModule module)
      Check if the module is loaded
      Parameters:
      module - the module
      Returns:
      if the module is loaded
    • getModuleFile

      @Nullable public static @Nullable File getModuleFile(String name)
      Get a module file by its module name
      Parameters:
      name - the module name
      Returns:
      the module file
    • getByFile

      @Nullable public static @Nullable PluginModule getByFile(@NotNull @NotNull File moduleFile)
      Get a plugin module by name
      Parameters:
      moduleFile - the plugin module file
      Returns:
      the plugin module
    • getProvidingModule

      @Nullable public static @Nullable PluginModule getProvidingModule(Class<? extends PluginModule> clazz)
      Get a module by its module class
      Parameters:
      clazz - the module class
      Returns:
      the plugin module attached to that module clazz
    • getModules

      public static Set<PluginModule> getModules()
      Get a list of the loaded modules
      Returns:
      a list of the loaded modules
    • loadModule

      public void loadModule(File moduleFile, LoadRule rule)
      Load the specified module
      Parameters:
      moduleFile - the module file
      rule - the rule the module must have to be loaded
    • unloadModule

      public void unloadModule(File moduleFile)
      Unload the specified module
      Parameters:
      moduleFile - the module file
    • getDataFolder

      public File getDataFolder()
      Get the modules folder
      Returns:
      the modules folder