Class Plugin<TConfig>
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
Author
Gets the plugin author.
public virtual string Author { get; }
Property Value
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
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
InternalTranslation
Gets the internally used translations. Plugins should implement Plugin<TConfig, TTranslation> and use Translation.
public ITranslation InternalTranslation { get; protected set; }
Property Value
Name
Gets the plugin name.
public virtual string Name { get; }
Property Value
Prefix
Gets the plugin prefix.
public virtual string Prefix { get; }
Property Value
Priority
Gets the plugin priority. Higher values mean higher priority and vice versa.
public virtual PluginPriority Priority { get; }
Property Value
RequiredExiledVersion
Gets the required version of Exiled to run the plugin without bugs or incompatibilities.
public virtual Version RequiredExiledVersion { get; }
Property Value
TranslationPath
Gets the plugin translation path.
public string TranslationPath { get; }
Property Value
Version
Gets the plugin version.
public virtual Version Version { get; }
Property Value
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
Returns
- int
A value that indicates the relative order of the objects being compared. The return value has these meanings:
ValueMeaning
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
TypeCommandSystem.ICommand's type.
commandHandler
TypeCommandSystem.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()