swiftlys2/docs/api/ai/
API Reference Plugins

IPluginManager

Interface
Namespace: SwiftlyS2.Shared.Plugins · Assembly: SwiftlyS2.CS2.dll
public interface IPluginManager
View source

Methods

GetAllPluginMetadata()

Gets a dictionary of all plugin metadata, keyed by plugin ID.

Dictionary<string, PluginMetadata> GetAllPluginMetadata()

GetAllPluginStatuses()

Gets a dictionary of all plugin statuses, keyed by plugin ID.

Dictionary<string, PluginStatus> GetAllPluginStatuses()

GetAllPlugins()

Gets a list of all plugin IDs.

IEnumerable<string> GetAllPlugins()

GetPluginMetadata(string)

Gets the metadata of the specified plugin.

PluginMetadata? GetPluginMetadata(string pluginId)
Parameters
  • pluginIdstringThe ID of the plugin.

GetPluginPath(string)

Gets the path of the specified plugin.

string? GetPluginPath(string pluginId)
Parameters
  • pluginIdstringThe ID of the plugin.
Returns

GetPluginPaths()

Gets a dictionary of all plugin paths, keyed by plugin ID.

Dictionary<string, string> GetPluginPaths()

GetPluginStatus(string)

Gets the status of the specified plugin.

PluginStatus? GetPluginStatus(string pluginId)
Parameters
  • pluginIdstringThe ID of the plugin.
Returns

LoadPlugin(string, bool)

Loads the specified plugin.

bool LoadPlugin(string pluginId, bool silent = false)
Parameters
  • pluginIdstringThe ID of the plugin.
  • silentbooloptionalIf true, suppresses any error messages.
Returns
True if the plugin was loaded successfully, false otherwise.

ReloadPlugin(string, bool)

Reloads the specified plugin.

bool ReloadPlugin(string pluginId, bool silent = false)
Parameters
  • pluginIdstringThe ID of the plugin.
  • silentbooloptionalIf true, suppresses any error messages.
Returns
True if the plugin was reloaded successfully, false otherwise.

UnloadPlugin(string, bool)

Unloads the specified plugin.

bool UnloadPlugin(string pluginId, bool silent = false)
Parameters
  • pluginIdstringThe ID of the plugin.
  • silentbooloptionalIf true, suppresses any error messages.
Returns
True if the plugin was unloaded successfully, false otherwise.