Table of Contents

Class Plugin<TConfig>

Namespace
Exiled.API.Features
Assembly
Exiled.API.dll

Expose how a plugin has to be made.

public abstract class Plugin<TConfig> : IPlugin<TConfig>, IComparable<IPlugin<IConfig>> where TConfig : IConfig, new()

Type Parameters

TConfig

The config type.

Inheritance
Plugin<TConfig>
Implements
IPlugin<TConfig>
Derived
Plugin<TConfig, TTranslation>
Inherited Members
Extension Methods

Constructors

Plugin()

Initializes a new instance of the Plugin<TConfig> class.

public Plugin()

Properties

Assembly

Gets the plugin assembly.

public Assembly Assembly { get; protected set; }

Property Value

Assembly

Author

Gets the plugin author.

public virtual string Author { get; }

Property Value

string

Commands

Gets the plugin commands.

public Dictionary<Type, Dictionary<Type, ICommand>> Commands { get; }

Property Value

Dictionary<Type, Dictionary<Type, ICommand>>

Config

Gets the plugin config.

public TConfig Config { get; }

Property Value

TConfig

ConfigPath

Gets the plugin config path.

public string ConfigPath { get; }

Property Value

string

IgnoreRequiredVersionCheck

Gets a value indicating whether a plugin should bypass the required EXILED version check. This should only be used by plugins which do not need to be updated across major version updates.

public virtual bool IgnoreRequiredVersionCheck { get; }

Property Value

bool

InternalTranslation

Gets the internally used translations. Plugins should implement Plugin<TConfig, TTranslation> and use Translation.

public ITranslation InternalTranslation { get; protected set; }

Property Value

ITranslation

Name

Gets the plugin name.

public virtual string Name { get; }

Property Value

string

Prefix

Gets the plugin prefix.

public virtual string Prefix { get; }

Property Value

string

Priority

Gets the plugin priority. Higher values mean higher priority and vice versa.

public virtual PluginPriority Priority { get; }

Property Value

PluginPriority

RequiredExiledVersion

Gets the required version of Exiled to run the plugin without bugs or incompatibilities.

public virtual Version RequiredExiledVersion { get; }

Property Value

Version

TranslationPath

Gets the plugin translation path.

public string TranslationPath { get; }

Property Value

string

Version

Gets the plugin version.

public virtual Version Version { get; }

Property Value

Version

Methods

CompareTo(IPlugin<IConfig>)

Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.

public int CompareTo(IPlugin<IConfig> other)

Parameters

other IPlugin<IConfig>

An object to compare with this instance.

Returns

int

A value that indicates the relative order of the objects being compared. The return value has these meanings:
Value

Meaning

Less than zero

This instance precedes other in the sort order.

Zero

This instance occurs in the same position in the sort order as other.

Greater than zero

This instance follows other in the sort order.

GetCommand(Type, Type)

Gets a command by it's type.

public ICommand GetCommand(Type type, Type commandHandler = null)

Parameters

type Type

CommandSystem.ICommand's type.

commandHandler Type

CommandSystem.CommandHandler's type. Defines in which command handler command is registered.

Returns

ICommand

A CommandSystem.ICommand. May be null if command is not registered.

OnDisabled()

Fired after disabling the plugin.

public virtual void OnDisabled()

OnEnabled()

Fired after enabling the plugin.

public virtual void OnEnabled()

OnRegisteringCommands()

Fired before registering commands.

public virtual void OnRegisteringCommands()

OnReloaded()

Fired after reloading the plugin.

public virtual void OnReloaded()

OnUnregisteringCommands()

Fired before unregistering configs.

public virtual void OnUnregisteringCommands()