Class ModuleInfo
module.yml.
Holds name, description, main class, version, authors, website, plugin/module dependency lists, Folia support flag, declared load phase, libraries, and simple permission/command metadata.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classSimple immutable description of a command from module.yml:static final classImmutable descriptor for a library entry underlibraries:in module.yml.static final classSimple immutable description of a permission from module.yml: -
Method Summary
Modifier and TypeMethodDescriptionauthors()Gets authors of this module (may be empty, nevernull).commands()Returns commands defined incommands:in module.yml, keyed by command name.Gets the module description (fromdescriptionin module.yml).static ModuleInfofromYaml(InputStream in) Parses a minimal YAML-like stream into aModuleInfo.Libraries declared underlibraries:in module.yml.Declared enable phase for this module viaload:.Gets the fully qualified main class, ornullif not provided.Required module dependencies.Modules that should load after this module.Optional module dependencies.name()Gets the module name, ornullif not provided.Returns permissions defined inpermissions:in module.yml, keyed by permission node.Required Bukkit plugin dependencies.Plugins that should load after this module.Optional Bukkit plugin dependencies.booleanWhether this module declares Folia support viasupportsFolia: true.version()Gets the module version (defaults to"0.0.0"if missing).website()Gets the website URL for this module, ornullif not provided.
-
Method Details
-
name
Gets the module name, ornullif not provided. -
description
Gets the module description (fromdescriptionin module.yml). -
mainClass
Gets the fully qualified main class, ornullif not provided. -
version
Gets the module version (defaults to"0.0.0"if missing). -
website
Gets the website URL for this module, ornullif not provided. -
authors
Gets authors of this module (may be empty, nevernull). -
pluginDepends
Required Bukkit plugin dependencies. -
pluginSoftDepends
Optional Bukkit plugin dependencies. -
pluginLoadBefore
Plugins that should load after this module. -
moduleDepends
Required module dependencies. -
moduleSoftDepends
Optional module dependencies. -
moduleLoadBefore
Modules that should load after this module. -
supportsFolia
public boolean supportsFolia()Whether this module declares Folia support viasupportsFolia: true.- Returns:
trueifsupportsFoliais explicitly true; otherwisefalse.
-
loadPhase
Declared enable phase for this module viaload:.Valid values are
STARTUP,POSTWORLD,COMPLETED. If missing or invalid, defaults toGravesXModuleController.LoadPhase.COMPLETED.- Returns:
- declared load phase (never
null)
-
libraries
Libraries declared underlibraries:in module.yml.- Returns:
- immutable list of library definitions (may be empty, never
null)
-
permissions
Returns permissions defined inpermissions:in module.yml, keyed by permission node. -
commands
Returns commands defined incommands:in module.yml, keyed by command name. -
fromYaml
Parses a minimal YAML-like stream into aModuleInfo.Supports top-level keys:
name,description,main,version,website,author(single) orauthors(list),pluginDepends,pluginSoftDepends,pluginLoadBefore,moduleDepends,moduleSoftDepends/moduleSoftDepend,moduleLoadBefore,supportsFolia,load,libraries,permissions,commands.Libraries support a simple list with optional nested flags:
libraries: - group:artifact:version - group:artifact:version relocatefrom: old.pkg relocateto: new.pkg isIsolated: true useTransitive: false repo: https://repo.example/ id: myRepoList values may be comma-separated on the same line or via
- itemlines. Comments (#) and blank lines are ignored.- Parameters:
in- Input stream ofmodule.yml. Must not benull.- Returns:
- Parsed module info.
- Throws:
Exception- If reading or parsing fails.
-