Class ModuleRegistry

java.lang.Object
me.totalfreedom.data.ModuleRegistry

public class ModuleRegistry extends Object
A registry for modules.
  • Constructor Details

    • ModuleRegistry

      public ModuleRegistry()
      Creates a new module registry.
  • Method Details

    • addModule

      public void addModule(org.bukkit.plugin.java.JavaPlugin plugin)
      Adds a module to the registry.
      Parameters:
      plugin - The module to add.
    • removeModule

      public void removeModule(org.bukkit.plugin.java.JavaPlugin plugin)
      Removes a module from the registry.
      Parameters:
      plugin - The module to remove.
    • getProvider

      public <T extends org.bukkit.plugin.java.JavaPlugin> ModuleProvider<T> getProvider(Class<T> clazz)
      Gets a module from the registry wrapped in a ModuleProvider.
      Type Parameters:
      T - The type of the module.
      Parameters:
      clazz - The class of the module.
      Returns:
      The module.