Namespace Shard.Modding.SDK.Module
Classes
- BaseModule
Convenience base for a module's
Moduleclass. Stores the module context and re-exposes host events, registries, and logging through Events, Registries, and Log. Override theOn*lifecycle hooks; only Manifest is required. Subclasses that own resources before setup completes may implement IDisposable; the host disposes them even when later lifecycle hooks are skipped.
- ModuleManifest
A module's identity and dependency declaration - the C# analogue of the Java
PluginManifest. Declared in code on each module'sModuleclass.Dependency references may be a fully-qualified
"Group:Name"or a bare"Name"(resolved within the loaded set by name).
Interfaces
- IModule
Contract every Shard module implements. The host runs dependency-aware Setup(IModuleContext), PreloadAsync(CancellationToken), and Start() phases in that order. After eligible starts finish and failed or blocked modules are cleaned up, the host publishes one
ServerReadyEvent. During teardown, QuiesceAsync() first stops active work and exposes its completion. Shutdown() then releases remaining synchronous resources in reverse order. Modules that also implement IDisposable are disposed after shutdown. If setup never succeeds, the host skips quiescence and shutdown and uses disposal as the lifetime cleanup.
- IModuleContext
The server-facing surface handed to a module at setup. It exposes server events (scoped to the module) and a module-tagged logger; the scheduler, service registry, and world access will be added here as those subsystems land. A module's
Moduleclass holds this and re-exposes it to the rest of the module's code.