Skip to content

Write Plugin

Empostor has a powerful plugin system. This section covers everything you need to develop, publish, and use plugins.


Plugin Development

Getting Started

Writing a Plugin is the complete step-by-step guide:

  1. Install the .NET SDK
  2. Create a C# class library project
  3. Add the Empostor.Api NuGet package
  4. Write your plugin class (extend PluginBase)
  5. Add event listeners (IEventListener with [EventListener] attributes)
  6. Register listeners in EnableAsync()
  7. Build, copy to plugins/, and run

Topics covered: dependency injection, server configuration for plugin paths, using external libraries, and version compatibility.

Internationalization (i18n)

Internationalization (i18n) — translate your plugin into 15 languages using the IPluginLanguageProvider interface. Includes the LanguageString API for placeholder replacement and formatting. For text-file-based messages, see HelloWorld.txt.

Hello Page

Hello Page documents how Empostor serves a customizable home page at http://your-server:22023/. On startup, the server creates a Pages/index.html file that you can edit freely — changes take effect without restarting.


Built-in Plugins

Empostor ships with several plugins that demonstrate the plugin API:

PluginDescriptionDocs
Boot.CodesReplace random game codes with human-readable words like SUNSET, ROCKET. Uses custom word lists.Boot.Codes
MessageLeave offline messages for players by friend code. Messages are delivered when the recipient joins.Message Plugin
Player ChannelCross-game chat channels based on friend codes. Communicate with friends across different lobbies.Player Channel
Chat ManagerLog all in-game chat and enforce configurable message length limits for players and hosts.Chat Manager
Map VotePlayers vote for the next map using chat commands. The most popular map is selected automatically.Map Vote
NarratorAI-powered strategic advisor during meetings. Uses DeepSeek AI to provide contextual advice.Narrator
Player StatisticsTrack persistent per-player game stats: wins, kills, tasks, and more.Player Stats
Welcome MessagesLocalized welcome messages with placeholders, remote content, and random selection.Welcome
Title SystemAssign display title prefixes to players by friend code. One-time-use titles via config or API.Titles
QQ VerifyQQ number verification for linking game accounts to QQ accounts.QQ Verify
Friend Code ValidatorValidate friend codes against format patterns and a built-in dictionary.Friend Code Validator
Server MonitorHTTP API endpoints for server health checks and status monitoring.Server Monitor
Privacy PolicyServe and manage a customizable privacy policy page via admin API.Privacy Policy
Discord WebhookSend game events to Discord channels via webhooks.Discord Webhook
Chat FilterFilter blocked words and rate-limit spam in game chat.Chat Filter
Fixed Room CodeAssign fixed/predictable room codes to specific players by friend code.Boot.Codes
ExampleDemo plugin showcasing the full Empostor plugin API.Writing a Plugin

Plugin Marketplace

The Plugin Marketplace allows server admins to browse and install plugins from the admin panel. Learn the plugins.json format to publish your own plugins:

  • Plugin metadata (id, name, description, author)
  • Version history with download URLs
  • Minimum Empostor version requirements
  • Multi-version support with version picker in the admin UI