Class PluginManager
The manager class for all plugins.
Inheritance
Inherited Members
Namespace: IPA.Loader
Assembly: IPA.Loader.dll
Syntax
public static class PluginManager
Properties
| Improve this Doc View SourceAllPlugins
Gets a list of all BSIPA plugins.
Declaration
public static IEnumerable<PluginLoader.PluginInfo> AllPlugins { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<PluginLoader.PluginInfo> | a collection of all enabled plugins as PluginLoader.PluginInfos |
DisabledPlugins
Gets a list of disabled BSIPA plugins.
Declaration
public static IEnumerable<PluginLoader.PluginMetadata> DisabledPlugins { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<PluginLoader.PluginMetadata> | a collection of all disabled plugins as PluginLoader.PluginMetadata |
Plugins
An System.Collections.IEnumerable of old IPA plugins.
Declaration
[Obsolete("I mean, IPlugin shouldn't be used, so why should this? Not renaming to extend support for old plugins.")]
public static IEnumerable<IPlugin> Plugins { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<IPlugin> | all legacy plugin instances |
Methods
| Improve this Doc View SourceDisablePlugin(PluginLoader.PluginInfo)
Disables a plugin, and all dependents.
Declaration
public static bool DisablePlugin(PluginLoader.PluginInfo plugin)
Parameters
Type | Name | Description |
---|---|---|
PluginLoader.PluginInfo | plugin | the plugin to disable |
Returns
Type | Description |
---|---|
System.Boolean | whether or not it needs a restart to enable |
DisablePlugin(String)
Disables a plugin, and all dependents.
Declaration
public static bool DisablePlugin(string pluginId)
Parameters
Type | Name | Description |
---|---|---|
System.String | pluginId | the ID, or name if the ID is null, of the plugin to disable |
Returns
Type | Description |
---|---|
System.Boolean | whether a restart is needed to activate |
EnablePlugin(PluginLoader.PluginMetadata)
Enables a plugin that had been previously disabled.
Declaration
public static bool EnablePlugin(PluginLoader.PluginMetadata plugin)
Parameters
Type | Name | Description |
---|---|---|
PluginLoader.PluginMetadata | plugin | the plugin to enable |
Returns
Type | Description |
---|---|
System.Boolean | whether a restart is needed to activate |
EnablePlugin(String)
Enables a plugin that had been previously disabled.
Declaration
public static bool EnablePlugin(string pluginId)
Parameters
Type | Name | Description |
---|---|---|
System.String | pluginId | the ID, or name if the ID is null, of the plugin to enable |
Returns
Type | Description |
---|---|
System.Boolean | whether a restart is needed to activate |
GetDisabledPlugin(String)
Gets a disabled plugin's metadata by its name.
Declaration
public static PluginLoader.PluginMetadata GetDisabledPlugin(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | the name of the disabled plugin to get |
Returns
Type | Description |
---|---|
PluginLoader.PluginMetadata | the metadata for the corresponding plugin |
GetDisabledPluginFromId(String)
Gets a disabled plugin's metadata by its ID.
Declaration
public static PluginLoader.PluginMetadata GetDisabledPluginFromId(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | the ID of the disabled plugin to get |
Returns
Type | Description |
---|---|
PluginLoader.PluginMetadata | the metadata for the corresponding plugin |
GetPlugin(String)
Gets info about the plugin with the specified name.
Declaration
public static PluginLoader.PluginInfo GetPlugin(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | the name of the plugin to get (must be an exact match) |
Returns
Type | Description |
---|---|
PluginLoader.PluginInfo | the plugin info for the requested plugin or null |
GetPluginFromId(String)
Gets info about the plugin with the specified ID.
Declaration
public static PluginLoader.PluginInfo GetPluginFromId(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | the ID name of the plugin to get (must be an exact match) |
Returns
Type | Description |
---|---|
PluginLoader.PluginInfo | the plugin info for the requested plugin or null |
GetPluginFromModSaberName(String)
Gets info about the plugin with the specified ModSaber name.
Declaration
[Obsolete("Old name. Use GetPluginFromId instead.")]
public static PluginLoader.PluginInfo GetPluginFromModSaberName(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | the ModSaber name of the plugin to get (must be an exact match) |
Returns
Type | Description |
---|---|
PluginLoader.PluginInfo | the plugin info for the requested plugin or null |
InfoFromMetadata(PluginLoader.PluginMetadata)
Converts a plugin's metadata to a PluginLoader.PluginInfo.
Declaration
public static PluginLoader.PluginInfo InfoFromMetadata(PluginLoader.PluginMetadata meta)
Parameters
Type | Name | Description |
---|---|---|
PluginLoader.PluginMetadata | meta | the metadata |
Returns
Type | Description |
---|---|
PluginLoader.PluginInfo | the plugin info |
IsDisabled(PluginLoader.PluginMetadata)
Checks if a given plugin is disabled.
Declaration
public static bool IsDisabled(PluginLoader.PluginMetadata meta)
Parameters
Type | Name | Description |
---|---|---|
PluginLoader.PluginMetadata | meta | the plugin to check |
Returns
Type | Description |
---|---|
System.Boolean | true if the plugin is disabled, false otherwise. |
IsEnabled(PluginLoader.PluginMetadata)
Checks if a given plugin is enabled.
Declaration
public static bool IsEnabled(PluginLoader.PluginMetadata meta)
Parameters
Type | Name | Description |
---|---|---|
PluginLoader.PluginMetadata | meta | the plugin to check |
Returns
Type | Description |
---|---|
System.Boolean | true if the plugin is enabled, false otherwise. |
Events
| Improve this Doc View SourcePluginDisabled
Called whenever a plugin is disabled.
Declaration
public static event PluginManager.PluginDisableDelegate PluginDisabled
Event Type
Type | Description |
---|---|
PluginManager.PluginDisableDelegate |
PluginEnabled
Called whenever a plugin is enabled.
Declaration
public static event PluginManager.PluginEnableDelegate PluginEnabled
Event Type
Type | Description |
---|---|
PluginManager.PluginEnableDelegate |