Interface IPlugin
- Namespace
- CounterStrikeSharp.API.Core
- Assembly
- CounterStrikeSharp.API.dll
Interface which every CounterStrikeSharp plugin must implement. Module will be created with parameterless constructor and then Load method will be called.
public interface IPlugin : IDisposable
- Inherited Members
Properties
CommandManager
ICommandManager CommandManager { get; set; }
Property Value
Localizer
IStringLocalizer Localizer { get; set; }
Property Value
Logger
ILogger Logger { get; set; }
Property Value
ModuleAuthor
string ModuleAuthor { get; }
Property Value
ModuleDescription
string ModuleDescription { get; }
Property Value
ModuleName
Name of the plugin.
string ModuleName { get; }
Property Value
ModulePath
string ModulePath { get; }
Property Value
ModuleVersion
Module version.
string ModuleVersion { get; }
Property Value
Methods
InitializeConfig(object, Type)
void InitializeConfig(object instance, Type pluginType)
Parameters
Load(bool)
This method is called by CounterStrikeSharp on plugin load and should be treated as plugin constructor.
Called with true
on a hot reload (DLL file replaced in plugins folder)
void Load(bool hotReload)
Parameters
hotReload
bool
RegisterAllAttributes(object)
void RegisterAllAttributes(object instance)
Parameters
instance
object
Unload(bool)
Will be called by CounterStrikeSharp on plugin unload. In this method the plugin should cleanup any extra resources. Event handlers, listeners etc. will automatically be deregistered.
void Unload(bool hotReload)
Parameters
hotReload
bool