Class Bootstrap
public static class Bootstrap
- Inheritance
-
Bootstrap
- Inherited Members
Properties
Configurations
Static reference to the plugin configurations manager.
public static PluginConfigManager Configurations { get; }
Property Value
Plugin
Static reference to the Bootstrap plugin instance.
public static IPlugin<BootstrapPluginContext> Plugin { get; }
Property Value
PluginManager
Static reference to the PluginManager instance.
public static PluginManager PluginManager { get; }
Property Value
ProxyPlugins
Static reference to the proxy plugins map.
public static Map<string, IPlugin> ProxyPlugins { get; }
Property Value
SharedComponents
Static reference to the shared component's manager.
public static PluginComponentsManager SharedComponents { get; }
Property Value
Methods
AddSharedComponent<T>(IPlugin, bool)
Adds a shared component of the specified type to the plugin's shared components.
public static T? AddSharedComponent<T>(IPlugin plugin, bool failIfExists = true) where T : class, IPluginComponent
Parameters
pluginIPluginThe plugin that owns the shared component.
failIfExistsboolThrow an exception if the shared component already exists. Default: true
Returns
- T
Returns the added shared component of the specified type, or null if it could not be added.
Type Parameters
TThe type of the shared component to add. Must implement IPluginComponent.
AddSharedComponent<T>(IPlugin, T, bool)
Adds a shared component of the specified type to the plugin's shared components.
public static void AddSharedComponent<T>(IPlugin plugin, T obj, bool failIfExists = true) where T : class, IPluginComponent
Parameters
pluginIPluginThe plugin that owns the shared component.
objTThe shared component instance to add.
failIfExistsboolThrow an exception if the shared component already exists. Default: true
Type Parameters
TThe type of the shared component to add. Must implement IPluginComponent.
GetSharedComponent(Type)
Gets a shared component of the specified type from the plugin's shared components.
public static IPluginComponent? GetSharedComponent(Type type)
Parameters
typeTypeThe type of the shared component to retrieve.
Returns
- IPluginComponent
Returns the shared component of the specified type, or null if it does not exist.
Exceptions
- AccessViolationException
Thrown if the plugin is not initialized when trying to get a shared component.
GetSharedComponent<TX>()
Gets a shared component of the specified type from the plugin's shared components.
public static TX? GetSharedComponent<TX>() where TX : class, IPluginComponent
Returns
- TX
Returns the shared component of the specified type, or null if it does not exist.
Type Parameters
TXThe type of the shared component to retrieve. Must implement IPluginComponent.
Exceptions
- AccessViolationException
Thrown if the plugin is not initialized when trying to get a shared component.
Load(IPlugin?)
public static void Load(IPlugin? plugin = null)
Parameters
pluginIPlugin
Load(string, string, string, Action<IPlugin>)
public static IPlugin Load(string pluginGuid, string pluginName, string pluginVersion, Action<IPlugin> onLoading)
Parameters
Returns
OnGameDataInitialized(OnGameDataInitializedEvent)
Called when the game data is initialized. This method is triggered by the EventBridge.OnGameDataInitializedEvent.
public static void OnGameDataInitialized(EventBridge.OnGameDataInitializedEvent @event)
Parameters
eventEventBridge.OnGameDataInitializedEventThe event containing the initialized game data.
OnPluginsInitializing(OnPluginsInitializingEvent, IPlugin)
public static void OnPluginsInitializing(EventBridge.OnPluginsInitializingEvent @event, IPlugin plugin)
Parameters
eventEventBridge.OnPluginsInitializingEventpluginIPlugin
OnPluginsLoaded(OnPluginsLoadedEvent, IPlugin)
public static void OnPluginsLoaded(EventBridge.OnPluginsLoadedEvent @event, IPlugin plugin)
Parameters
eventEventBridge.OnPluginsLoadedEventpluginIPlugin
OnPluginsLoading(OnPluginsLoadingEvent, IPlugin)
public static void OnPluginsLoading(EventBridge.OnPluginsLoadingEvent @event, IPlugin plugin)
Parameters
eventEventBridge.OnPluginsLoadingEventpluginIPlugin
Reload(IPlugin?)
public static void Reload(IPlugin? plugin = null)
Parameters
pluginIPlugin
Unload(IPlugin?)
Unloads the plugin, unregistering events and cleaning up resources.
public static void Unload(IPlugin? plugin = null)
Parameters
pluginIPlugin