GroundsServer. Use descriptor-backed providers for reusable modules so the
runtime can validate dependencies before Minestom accepts players.
Module lifecycle
ImplementGroundsModule for runtime behavior.
install(ctx) on all modules,
starts Minestom, then calls start() in module order. During shutdown it calls
stop() in reverse module order before registered shutdown hooks run.
Server context
GroundsServerContext provides runtime information and shared services.
Module providers
Use aGroundsModuleProvider when a module should be discoverable on the
runtime classpath.
install or start.
ServiceLoader registration
Provider-backed modules are discovered through JavaServiceLoader. Add this
file to the module artifact:
META-INF/services/gg.grounds.runtime.GroundsModuleProvider
GroundsServer.builder().discoverProviders() can find it.
Server-type compatibility
serverTypes controls where a provider is active.
ServerType.MINIGAME for game servers and ServerType.LOBBY for
lobby-only modules. Omit the override only when the module supports both
server types.
Service contracts
Userequires and provides to describe module-to-module contracts. Use
dependsOn only for an ordering requirement that has no service contract.
Next steps
- Read Runtime composition to select provider-backed modules in a server.
- Read Local modules to test a module from a local repository.
