Table of Contents

Class Bootstrap

Namespace
RisingV.Shared
Assembly
RisingV.Shared.dll
public static class Bootstrap
Inheritance
Bootstrap
Inherited Members

Properties

Configurations

Static reference to the plugin configurations manager.

public static PluginConfigManager Configurations { get; }

Property Value

PluginConfigManager

Plugin

Static reference to the Bootstrap plugin instance.

public static IPlugin<BootstrapPluginContext> Plugin { get; }

Property Value

IPlugin<BootstrapPluginContext>

PluginManager

Static reference to the PluginManager instance.

public static PluginManager PluginManager { get; }

Property Value

PluginManager

ProxyPlugins

Static reference to the proxy plugins map.

public static Map<string, IPlugin> ProxyPlugins { get; }

Property Value

Map<string, IPlugin>

SharedComponents

Static reference to the shared component's manager.

public static PluginComponentsManager SharedComponents { get; }

Property Value

PluginComponentsManager

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 IPlugin

The plugin that owns the shared component.

failIfExists bool

Throw 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 IPlugin

The plugin that owns the shared component.

obj T

The shared component instance to add.

failIfExists bool

Throw 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 Type

The 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

pluginGuid string
pluginName string
pluginVersion string
onLoading Action<IPlugin>

Returns

IPlugin

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.OnGameDataInitializedEvent

The event containing the initialized game data.

OnPluginsInitializing(OnPluginsInitializingEvent, IPlugin)

public static void OnPluginsInitializing(EventBridge.OnPluginsInitializingEvent @event, IPlugin plugin)

Parameters

event EventBridge.OnPluginsInitializingEvent
plugin IPlugin

OnPluginsLoaded(OnPluginsLoadedEvent, IPlugin)

public static void OnPluginsLoaded(EventBridge.OnPluginsLoadedEvent @event, IPlugin plugin)

Parameters

event EventBridge.OnPluginsLoadedEvent
plugin IPlugin

OnPluginsLoading(OnPluginsLoadingEvent, IPlugin)

public static void OnPluginsLoading(EventBridge.OnPluginsLoadingEvent @event, IPlugin plugin)

Parameters

event EventBridge.OnPluginsLoadingEvent
plugin 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