Class ModuleManager.DescriptorImpl

java.lang.Object
dev.cwhead.GravesX.module.ModuleManager.DescriptorImpl
All Implemented Interfaces:
GravesXModuleDescriptor
Enclosing class:
ModuleManager

private static final class ModuleManager.DescriptorImpl extends Object implements GravesXModuleDescriptor
Read-only adapter that exposes a module's module.yml metadata and current runtime state via GravesXModuleDescriptor.

This is a thin wrapper over ModuleManager.LoadedModule and its info.

  • Field Details

  • Constructor Details

  • Method Details

    • getName

      public String getName()
      Module display name from module.yml:name.
      Specified by:
      getName in interface GravesXModuleDescriptor
      Returns:
      module name, never null
    • getVersion

      public String getVersion()
      Module version from module.yml:version.
      Specified by:
      getVersion in interface GravesXModuleDescriptor
      Returns:
      version string, or null if unspecified
    • getDescription

      public String getDescription()
      Human-readable description from module.yml:description.
      Specified by:
      getDescription in interface GravesXModuleDescriptor
      Returns:
      description text, or null if unspecified
    • getWebsite

      public String getWebsite()
      Project website or documentation URL from module.yml:website.
      Specified by:
      getWebsite in interface GravesXModuleDescriptor
      Returns:
      website URL, or null if unspecified
    • getAuthors

      public List<String> getAuthors()
      Author list from module.yml:authors.
      Specified by:
      getAuthors in interface GravesXModuleDescriptor
      Returns:
      immutable list of authors (may be empty)
    • getMainClass

      public String getMainClass()
      Fully qualified main class name from module.yml:main.
      Specified by:
      getMainClass in interface GravesXModuleDescriptor
      Returns:
      FQCN of the module entrypoint, never null
    • getModuleDepends

      public List<String> getModuleDepends()
      Hard module dependencies from module.yml:moduleDepends. These must be enabled before this module can enable.
      Specified by:
      getModuleDepends in interface GravesXModuleDescriptor
      Returns:
      immutable list of required module names (may be empty)
    • getModuleSoftDepends

      public List<String> getModuleSoftDepends()
      Soft module dependencies from module.yml:moduleSoftDepends. Presence adjusts load order but is not required.
      Specified by:
      getModuleSoftDepends in interface GravesXModuleDescriptor
      Returns:
      immutable list of soft-dependency module names (may be empty)
    • getModuleLoadBefore

      public List<String> getModuleLoadBefore()
      Modules that prefer to load after this one from module.yml:moduleLoadBefore.
      Specified by:
      getModuleLoadBefore in interface GravesXModuleDescriptor
      Returns:
      immutable list of module names that should load after this module (may be empty)
    • getPluginDepends

      public List<String> getPluginDepends()
      Required external Bukkit plugins from module.yml:pluginDepends.
      Specified by:
      getPluginDepends in interface GravesXModuleDescriptor
      Returns:
      immutable list of required plugin names (may be empty)
    • getPluginSoftDepends

      public List<String> getPluginSoftDepends()
      Optional external Bukkit plugins from module.yml:pluginSoftDepends.
      Specified by:
      getPluginSoftDepends in interface GravesXModuleDescriptor
      Returns:
      immutable list of soft plugin names (may be empty)
    • isEnabled

      public boolean isEnabled()
      Current runtime enablement state.
      Specified by:
      isEnabled in interface GravesXModuleDescriptor
      Returns:
      true if this module is enabled, otherwise false