Interface GravesXModuleDescriptor


public interface GravesXModuleDescriptor
Read-only view of a module's metadata (parsed from module.yml) plus its current runtime state.

All getters are non-mutating. Optional fields may be null or an empty list, depending on type.

The descriptor also exposes the supportsFolia flag parsed from module.yml, which indicates whether the module declares itself safe to run on Folia-based server implementations.

  • Method Details

    • getName

      String getName()
      Module display name from module.yml:name.
      Returns:
      module name, never null
    • getVersion

      String getVersion()
      Module version from module.yml:version.
      Returns:
      version string, or null if unspecified
    • getDescription

      String getDescription()
      Human-readable description from module.yml:description.
      Returns:
      description text, or null if unspecified
    • getWebsite

      String getWebsite()
      Project website or documentation URL from module.yml:website.
      Returns:
      website URL, or null if unspecified
    • getAuthors

      List<String> getAuthors()
      Author list from module.yml:authors.
      Returns:
      immutable list of authors (may be empty)
    • getMainClass

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

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

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

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

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

      List<String> getPluginSoftDepends()
      Optional external Bukkit plugins from module.yml:pluginSoftDepends.
      Returns:
      immutable list of soft plugin names (may be empty)
    • getLoadPhase

      Declared load phase from module.yml:load.

      This is a declarative hint that tells the host when the module expects to be enabled relative to server/plugin lifecycle.

      If omitted in module.yml, the host will default this to GravesXModuleController.LoadPhase.COMPLETED.

      Returns:
      the declared load phase, never null
    • getLibraries

      List<ModuleInfo.LibraryDef> getLibraries()
      Libraries declared in module.yml:libraries.

      Each entry describes the Maven coordinates plus optional relocation/isolation flags.

      Returns:
      immutable list of library definitions (may be empty)
    • isEnabled

      boolean isEnabled()
      Current runtime enablement state.
      Returns:
      true if this module is enabled, otherwise false
    • supportsFolia

      boolean supportsFolia()
      Whether this module declares Folia support via module.yml:supportsFolia.

      This is a purely declarative flag: it reflects what the module author configured in module.yml. The manager may still choose to disable the module at runtime if it detects incompatibilities, but this flag can be used by callers to understand the module's declared intent.

      If supportsFolia is omitted in module.yml, this will typically default to false.

      Returns:
      true if the module declares Folia support; false otherwise