Interface GravesXModuleDescriptor
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 Summary
Modifier and TypeMethodDescriptionAuthor list frommodule.yml:authors.Human-readable description frommodule.yml:description.Libraries declared inmodule.yml:libraries.Declared load phase frommodule.yml:load.Fully qualified main class name frommodule.yml:main.Hard module dependencies frommodule.yml:moduleDepends.Modules that prefer to load after this one frommodule.yml:moduleLoadBefore.Soft module dependencies frommodule.yml:moduleSoftDepends.getName()Module display name frommodule.yml:name.Required external Bukkit plugins frommodule.yml:pluginDepends.Optional external Bukkit plugins frommodule.yml:pluginSoftDepends.Module version frommodule.yml:version.Project website or documentation URL frommodule.yml:website.booleanCurrent runtime enablement state.booleanWhether this module declares Folia support viamodule.yml:supportsFolia.
-
Method Details
-
getName
String getName()Module display name frommodule.yml:name.- Returns:
- module name, never
null
-
getVersion
String getVersion()Module version frommodule.yml:version.- Returns:
- version string, or
nullif unspecified
-
getDescription
String getDescription()Human-readable description frommodule.yml:description.- Returns:
- description text, or
nullif unspecified
-
getWebsite
String getWebsite()Project website or documentation URL frommodule.yml:website.- Returns:
- website URL, or
nullif unspecified
-
getAuthors
Author list frommodule.yml:authors.- Returns:
- immutable list of authors (may be empty)
-
getMainClass
String getMainClass()Fully qualified main class name frommodule.yml:main.- Returns:
- FQCN of the module entrypoint, never
null
-
getModuleDepends
Hard module dependencies frommodule.yml:moduleDepends. These must be enabled before this module can enable.- Returns:
- immutable list of required module names (may be empty)
-
getModuleSoftDepends
Soft module dependencies frommodule.yml:moduleSoftDepends. Presence adjusts load order but is not required.- Returns:
- immutable list of soft-dependency module names (may be empty)
-
getModuleLoadBefore
Modules that prefer to load after this one frommodule.yml:moduleLoadBefore.- Returns:
- immutable list of module names that should load after this module (may be empty)
-
getPluginDepends
Required external Bukkit plugins frommodule.yml:pluginDepends.- Returns:
- immutable list of required plugin names (may be empty)
-
getPluginSoftDepends
Optional external Bukkit plugins frommodule.yml:pluginSoftDepends.- Returns:
- immutable list of soft plugin names (may be empty)
-
getLoadPhase
GravesXModuleController.LoadPhase getLoadPhase()Declared load phase frommodule.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 toGravesXModuleController.LoadPhase.COMPLETED.- Returns:
- the declared load phase, never
null
-
getLibraries
List<ModuleInfo.LibraryDef> getLibraries()Libraries declared inmodule.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:
trueif this module is enabled, otherwisefalse
-
supportsFolia
boolean supportsFolia()Whether this module declares Folia support viamodule.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
supportsFoliais omitted inmodule.yml, this will typically default tofalse.- Returns:
trueif the module declares Folia support;falseotherwise
-