Create a new plugin instance.
The identifier of the plugin.
The version of the plugin.
Optional
options: Partial<PluginOptions>The options of the plugin.
Readonly
blocksThe block registry for the plugin.
Readonly
entitiesThe entity registry for the plugin.
Readonly
identifierThe identifier of the plugin.
Whether or not the plugin is bundled.
Readonly
itemsThe item registry for the plugin.
Readonly
loggerThe logger for the plugin.
The path to the plugin.
The plugin pipeline the plugin is in.
Readonly
priorityThe priority of the plugin.
The serenity instance of the server.
Readonly
typeThe type of the plugin.
Readonly
versionThe version of the plugin.
The maximum number of listeners for the plugin.
The maximum number of listeners for the plugin.
Introduction
Plugins are the fundamental building blocks of SerenityJS. They are used to add additional functionality to the server, which allows total control over the server.
There are 2 types of plugins that are defined in the
PluginType
enum:Addon
&Api
Addon plugins add additional functionality to the server, without an exposed API. This means external plugins cannot directly interact with the plugins API. Api plugins add additional functionality to the server, with an exposed API for other plugins to use. This means external plugins can directly interact with the plugins API.
Class Extending Plugin