Develop Plugins
Empostor plugins are .NET class libraries that hook into server events. This section covers everything needed to write, build and publish one.
Start Here
Writing a Plugin is the complete step-by-step guide:
- Install the .NET SDK
- Create a C# class library project
- Add the
Empostor.ApiNuGet package - Write your plugin class (extend
PluginBase) - Add event listeners (
IEventListenerwith[EventListener]attributes) - Register listeners in an
IPluginStartup - Build, copy to
plugins/, and restart
Example Plugin is the counterpart to that guide — a minimal reference implementation that ships with the source. Read both together.
Topics
| Topic | Docs |
|---|---|
| Dependency injection and host config | Writing a Plugin |
| Event listener reference | Writing a Plugin · Example Plugin |
| Internationalization (i18n) | Writing a Plugin |
| Text file based messages | HelloWorld.txt |
| Serving custom web pages | Hello Page |
New to the codebase?
Copy Empostor.Plugins.Example and rename it. Every official plugin in Plugins follows the same structure, so they double as reference material.
Distribution
Once built, a plugin is a single .dll. Ship it one of two ways:
- Drop it into the server's
plugins/folder and restart. - Publish it to a Plugin Marketplace catalogue so operators can install it from the admin panel with one click.
Next Step
Browse the Plugin Catalogue for working examples of configuration, persistence and localisation.