Work In Progress
This documentation is in beta. It's missing lots of content, search is broken, and many links go nowhere. These problems will be fixed before release, but there's plenty of work left!
Skip to main content

Plugins

The plugins { } builder allows you to configure various aspects of the plugin system.

For more information on creating and using plugin, see [the plugins page].

Builders

manager { ... }Lambda Returns: PluginManager

Register a callback that constructs and returns an alternative implementation of the PluginManager type, if needed.

Lambda Arguments
pathsType: List<Path>

Configured list of plugin paths, to be passed into the plugin manager's constructor.

enabledType: Boolean

Whether the plugin system is enabled, to be passed into the plugin manager's constructor.

Functions

disable(...)

Prevent a plugin from loading on startup.

This won't prevent an extension from re-enabling the plugin later.

Arguments
idType: String

Plugin ID to disable.

pluginPath(...)

Add a path that should be searched for plugins.

By default, ./plugins will be searched.

Arguments
pathTypes:PathString

Path to search for plugins.

Properties

var enabledType: BooleanDefault: true

Whether the plugin system should be enabled.

Setting this to false will still create a plugin manager, to avoid breaking anything that depends on it. It won't load any plugins on startup, but extensions can still do so via its API.


The following properties are usually set using the functions and builders above. However, for advanced use-cases, you can mutate them yourself.

var disabledPluginsType: MutableList<String>Default: mutableListOf()

List containing disabled plugin IDs. Normally mutated via the disable(id) function.

Plugins with these IDs won't be loaded on startup, but this won't prevent an extension from re-enabling the plugin later.

var pluginPathsType: MutableList<Path>Default: mutableListOf(Path("./plugins"))

List of paths to search for plugins. Usually mutated via the pluginPath(path) function.