This repository has been archived by the owner on Feb 13, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 57
CoCSharp.Client.API Documentation
FICTURE7 edited this page Sep 30, 2015
·
2 revisions
We are trying to make the plugin API intuitive and easy to use. Help to improve it by giving feedbacks,
it can't really do much at the moment. :]
The base class is the Plugin
class. It is the class that contains
all the properties and methods to write plugins.
Base class that every plugin should inherit from. It is an abstract class.
Source: CoCSharp.Client.API.Plugin
Name | Type | Description |
---|---|---|
Client | ICoCClient | Gets the main client class. |
Name | string | Gets the name of the plugin. |
Description | string | Gets the description of the plugin. |
Author | string | Gets the author(s) of the plugin. |
Modifier | Name | Description |
---|---|---|
virtual | OnUpdate | Called every 100ms. |
virtual | OnEnable | Called when the plugin is enabled. |
virtual | OnDisable | Called when the plugin is disabled. |
virtual | OnLoad | Called when the plugin is loaded. |
virtual | OnUnload | Called when the plugin is unloaded. |
A PluginException
will be raised if you access the Client
property beofore OnLoad
method was called.
Provides methods to for plugins to use.
Source: CoCSharp.Client.API.ICoCClient
Name | Type | Description |
---|---|---|
Connection | Socket | Gets or sets the Socket which is associated with this ICoCClient. |
Home | Village | Gets or sets the Village which is associated with this ICoCClient. |
Avatar | Avatar | Gets or sets the Avatar which is associated with this ICoCClient. |
Fingerprint | Fingerprint | Gets or sets the Fingerprint which is associated with this ICoCClient. |
Name | Description |
---|---|
SendChatMessage | Sends the specified message to the global chat. |
SendPacket | Sends the specified packet to the server. |
RegisterPacketHandler | Registers the specified PacketHandler with the specified packet type. |
Name | Description |
---|---|
ChatMessage | The event raised when a chat message is received. |
Login | The event raised when logged in successfully. |
Client
property in Plugin
class will be set after OnLoad
method was called.