mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-11-07 17:36:07 +00:00
Fix format
This commit is contained in:
parent
27c40f27d2
commit
5624e77125
245 changed files with 307 additions and 167833 deletions
|
|
@ -9,7 +9,9 @@
|
|||
## Notes
|
||||
|
||||
::: tip
|
||||
|
||||
**For now this page contains only the bare basics of the Chat Bot API, enough of details to teach you how to make basic Chat Bots. For more details you need to take a look at the [ChatBot.cs](https://github.com/MCCTeam/Minecraft-Console-Client/blob/master/MinecraftClient/Scripting/ChatBot.cs) and [Examples](#examples). This page will be improved in the future.**
|
||||
|
||||
:::
|
||||
|
||||
**Minecraft Console Client** has a rich C# API which allows you to create Chat Bots (effectively plugins) which can help you create complex automations which normal scripts may not be able to do.
|
||||
|
|
@ -35,7 +37,9 @@ More in-depth:
|
|||
This introduction assumes that you have the basic knowledge of C#.
|
||||
|
||||
::: tip
|
||||
|
||||
**Here we will use terms Chat Bot and Script interchangeably**
|
||||
|
||||
:::
|
||||
|
||||
Create a new empty file and name it `ExampleChatBot.cs` in the same folder where you have your MCC installed.
|
||||
|
|
@ -115,7 +119,9 @@ MCC.LoadBot(new YourChatBotClassNameHere());
|
|||
**Script Metadata** section allows for including C# packages and libraries with: `//using <namespace>` and `/dll <dll name>`.
|
||||
|
||||
::: tip
|
||||
|
||||
**Avoid adding whitespace between `//` and keywords**
|
||||
|
||||
:::
|
||||
|
||||
By the default the following packages are loaded:
|
||||
|
|
@ -164,7 +170,9 @@ When the Chat Bot (Script) has been initialized for the first time the `Initiali
|
|||
In it you can initialize variables, eg. Dictionaries, etc..
|
||||
|
||||
::: tip
|
||||
|
||||
**For allocating resources like a database connection, we recommend allocating them in `AfterGameJoined` and freeing them in `OnDisconnect`**
|
||||
|
||||
:::.
|
||||
|
||||
## Examples
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue