mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
Add support for C# script extensions
- Allow defining function for use into the script - Allow defining a ChatBot for loading it into MCC - Improve sample script and add more examples - Todo add new documentation into the readme file
This commit is contained in:
parent
a6b3bf0481
commit
e29b4ee545
6 changed files with 115 additions and 26 deletions
|
|
@ -33,9 +33,10 @@ namespace MinecraftClient
|
|||
{
|
||||
public enum DisconnectReason { InGameKick, LoginRejected, ConnectionLost };
|
||||
|
||||
//Will be automatically set on bot loading, don't worry about this
|
||||
//Handler will be automatically set on bot loading, don't worry about this
|
||||
public void SetHandler(McTcpClient handler) { this._handler = handler; }
|
||||
public void SetMaster(ChatBot master) { this.master = master; }
|
||||
protected void SetMaster(ChatBot master) { this.master = master; }
|
||||
protected void LoadBot(ChatBot bot) { Handler.BotUnLoad(bot); Handler.BotLoad(bot); }
|
||||
private McTcpClient Handler { get { return master != null ? master.Handler : _handler; } }
|
||||
private McTcpClient _handler = null;
|
||||
private ChatBot master = null;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue