Create a new plugin instance.
The identifier of the plugin.
The version of the plugin.
Optionaloptions: Partial<PluginOptions>The options of the plugin.
ReadonlyblocksThe block registry for the plugin.
ReadonlyconfigThe config of the plugin.
ReadonlyentitiesThe entity registry for the plugin.
The file system for the plugin.
ReadonlyidentifierThe identifier of the plugin.
Whether or not the plugin is bundled.
ReadonlyitemsThe item registry for the plugin.
ReadonlyloggerThe logger for the plugin.
The path to the plugin.
The plugin pipeline the plugin is in.
ReadonlypriorityThe priority of the plugin.
ReadonlyresourcesThe resource packs provided by the plugin.
The serenity instance of the server.
ReadonlyversionThe 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
PluginTypeenum:Addon&ApiAddon 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