Table of Contents

Interface IPlugin

Namespace
RisingV.Shared.Plugins
Assembly
RisingV.Shared.dll

Represents a plugin in the RisingV framework.

public interface IPlugin : IPluginContext, IPluginComponent, IManageable<PluginComponentsManager>, IManageable<PluginManager>, IManageable, IReloadable<PluginManager>, IReloadable, IDisposable
Inherited Members
Extension Methods

Properties

DatabaseManager

The database manager for the plugin.

DatabaseManager DatabaseManager { get; }

Property Value

DatabaseManager

EngineManager

The engine manager for the plugin.

EngineManager EngineManager { get; }

Property Value

EngineManager

ProcessorManager

The processor manager for the plugin.

ProcessorManager ProcessorManager { get; }

Property Value

ProcessorManager

SystemManager

The system manager for the plugin.

SystemManager SystemManager { get; }

Property Value

SystemManager

Methods

AddSharedComponent<T>(IPlugin, bool)

Adds a shared component to the plugin context.

T? AddSharedComponent<T>(IPlugin plugin, bool failIfExists = true) where T : class, IPluginComponent

Parameters

plugin IPlugin

The plugin to which the component belongs.

failIfExists bool

Throw an exception if the shared component already exists. Default: true

Returns

T

The added plugin component of the specified type, or null if it was not added.

Type Parameters

T

The type of the plugin component to add.

AddSharedComponent<T>(IPlugin, T, bool)

Adds a shared component to the plugin context with an instance of the component.

void AddSharedComponent<T>(IPlugin plugin, T obj, bool failIfExists = true) where T : class, IPluginComponent

Parameters

plugin IPlugin

The plugin to which the component belongs.

obj T

The instance of the plugin component to add.

failIfExists bool

Throw an exception if the shared component already exists. Default: true

Type Parameters

T

The type of the plugin component to add.

GetSharedComponent(Type)

Gets a shared component of the specified type from the plugin context.

IPluginComponent? GetSharedComponent(Type type)

Parameters

type Type

The type of the plugin context to retrieve.

Returns

IPluginComponent

The plugin context of the specified type, or null if not found.

GetSharedComponent<TX>()

Gets a shared component of the specified type from the plugin context.

TX? GetSharedComponent<TX>() where TX : class, IPluginComponent

Returns

TX

The plugin component of the specified type, or null if not found.

Type Parameters

TX

The type of the plugin component to retrieve.

Load()

Loads the plugin, initializing it and registering necessary components and events.

void Load()

OnInitialize()

void OnInitialize()

OnLoad()

void OnLoad()

OnPreLoad()

void OnPreLoad()

OnUnload()

bool OnUnload()

Returns

bool

SetupConfiguration(PluginConfig?)

void SetupConfiguration(PluginConfig? pluginConfig)

Parameters

pluginConfig PluginConfig

SetupSharedEventBus(ManagedEventBus)

void SetupSharedEventBus(ManagedEventBus eventBus)

Parameters

eventBus ManagedEventBus