Plugin
This type is used to define the options for registerPlugins().
| Property | Type | Optional | Description |
|---|---|---|---|
| name | string | ❌ | Plugin name. |
| initialize | (client: XPClient) => void | Promise<void> | ❌ | Function to run on plugin initialization. |
| destroy | (client: XPClient) => void | Promise<void> | ✅ | Optional cleanup, run by unregisterPlugins(). |
| requiredVersions | string[] | ✅ | Required versions of simply-xp. |
備考
We support the following types of versioning:
2- Major Version (2.x.x) [Recommended]2.0- Major.Minor Version (2.0.x)2.0.0- Major.Minor.Patch Version (2.0.0)2.0.1-rc.1- Major.Minor.Patch-Prerelease.Build Version
Version compatibility is validated at runtime. It is the plugin author's responsibility to ensure required versions are compatible and accurate.