Plugin SDK Overview
The StellarStack Plugin SDK enables you to extend the platform with custom functionality, UI components, and integrations. Build plugins that add new features to your game servers, integrate with third-party services, or automate complex workflows.What is a Plugin?
A StellarStack plugin is a package that extends the platform’s functionality. Plugins can:- Hook into server lifecycle events - React to server starts, stops, restarts, and more
- Add custom UI tabs and widgets - Extend the web interface with new pages and components
- Execute automated actions - Download files, modify configurations, send commands
- Store persistent data - Use the built-in key-value storage system
- Integrate external services - Connect to APIs like CurseForge, Modrinth, or Steam Workshop
Installation
Install the Plugin SDK in your project:Creating Your First Plugin
Every plugin must extend theStellarPlugin base class and implement the required lifecycle methods.
Basic Plugin Structure
plugin.ts
Plugin Manifest
The manifest defines your plugin’s metadata and capabilities:Plugin Categories
Choose the most appropriate category for your plugin:game-management- Server management and administrationmodding- Mod/modpack installation and managementmonitoring- Metrics, analytics, and monitoringautomation- Scheduled tasks and automationintegration- Third-party service integrationssecurity- Security and access controlutility- General utilitiestheme- UI themes and customizationother- Uncategorized
Game Type Matching
Specify which game servers your plugin supports:"minecraft"matches: Paper, Spigot, Forge, Fabric, Vanilla, etc."rust"matches: Rust servers"valheim"matches: Valheim servers"ark"matches: ARK: Survival Evolved servers
Permissions System
Plugins must declare required permissions in their manifest:Plugin Context
ThePluginContext object provides access to the StellarStack API:
Plugin API
Access StellarStack functionality throughcontext.api:
Configuration Schema
Define plugin settings using JSON Schema:Lifecycle Hooks
onEnable
Called when the plugin is enabled. Use this to:- Register event hooks
- Initialize resources
- Set up API routes
- Load persistent data
onDisable
Called when the plugin is disabled. Use this to:- Clean up resources
- Save state
- Cancel scheduled tasks
onConfigUpdate (Optional)
Called when plugin configuration is updated:validateConfig (Optional)
Validate configuration before it’s applied:Storage System
Plugins have access to a scoped key-value storage system:Logging
Use the scoped logger for consistent output:[Plugin:your-plugin-id].
Error Handling
Always handle errors in your plugin code:Next Steps
- Plugin Hooks - Learn about available events
- Plugin UI - Create custom UI components
- Plugin API Reference - Complete API documentation