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
plugin
IPluginThe plugin that owns the shared component.
failIfExists
boolThrow 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
T
The 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
plugin
IPluginThe plugin that owns the shared component.
obj
TThe shared component instance to add.
failIfExists
boolThrow an exception if the shared component already exists. Default: true
Type Parameters
T
The 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
type
TypeThe 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
TX
The 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
plugin
IPlugin
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
event
EventBridge.OnGameDataInitializedEventThe event containing the initialized game data.
OnPluginsInitializing(OnPluginsInitializingEvent, IPlugin)
public static void OnPluginsInitializing(EventBridge.OnPluginsInitializingEvent @event, IPlugin plugin)
Parameters
event
EventBridge.OnPluginsInitializingEventplugin
IPlugin
OnPluginsLoaded(OnPluginsLoadedEvent, IPlugin)
public static void OnPluginsLoaded(EventBridge.OnPluginsLoadedEvent @event, IPlugin plugin)
Parameters
event
EventBridge.OnPluginsLoadedEventplugin
IPlugin
OnPluginsLoading(OnPluginsLoadingEvent, IPlugin)
public static void OnPluginsLoading(EventBridge.OnPluginsLoadingEvent @event, IPlugin plugin)
Parameters
event
EventBridge.OnPluginsLoadingEventplugin
IPlugin
Reload(IPlugin?)
public static void Reload(IPlugin? plugin = null)
Parameters
plugin
IPlugin
Unload(IPlugin?)
Unloads the plugin, unregistering events and cleaning up resources.
public static void Unload(IPlugin? plugin = null)
Parameters
plugin
IPlugin