**Recently we have changed the configuration format from INI to TOML, this part of the documentation has only been partially updated, it's work in progress, for the time being please refer to the `MinecraftClient.ini` for setting names, the descriptions and options should be up to date in most cases, but not guaranteed.**
Send a command and sneak on a regular or random basis or make the bot walk around randomly to avoid automatic AFK disconnection.
-**Settings:**
**Section:****`ChatBot.AntiAFK`**
#### `Enabled`
-**Description:**
This setting specifies if the Anti AFK Chat Bot is enabled.
-**Available values:**`true` and `false`.
-**Type:**`boolean`
-**Default:**`false`
#### `Delay`
-**Description:**
The time interval for execution in seconds.
If the `min` and `max` are the same, the time interval will be consistent. However if they are not the same, the plugin will choose a random number between `min` and `max`, this is useful if you want to have a random interval to trick anti afk plugins.
-**Format:**`{ min = <seconds>, max = <seconds> }`
-**Type:**`inline table with min and max fields which have type of double`
-**Default:**`{ min = 60.0, max = 60.0 }`
#### `Command`
-**Description:**
Command to be sent.
-**Type:**`string`
-**Default:**`/ping`
#### `Use_Sneak`
-**Description:**
Sometimes you can trick plugins with sneaking or command might not be enough, enable it if you need it.
-**Type:**`boolean`
-**Default:**`false`
#### `Use_Terrain_Handling`
-**Description:**
Should the bot use [Terrain Handling](configuration.md#terrainandmovements) instead of the command method.
This will enable your bot to randomly move about, thus a better anti afk effect.
::: tip **You need to enable [Terrain Handling](configuration.md#terrainandmovements) in the settings and it's recommended to put the bot into an enclosure not to wander off. (Recommended size 5x5x5)**
::: tip **You need to have [inventoryhandling](configuration.md#inventoryhandling) and [entityhandling](configuration.md#entityhandling) enabled in order for this bot to work.**
::: tip **You need to have [inventoryhandling](configuration.md#inventoryhandling) enabled in order for basic crafting in the inventory to work, in addition if you want to use a crafting table, you need to enable [terrainandmovements](configuration.md#terrainandmovements) in order for bot to be able to reach the crafting table.**
::: tip **If you have a case where you have to leave some fields empty, use `"Null"` to mark them as empty. Example for stone bricks: `Slots = [ "Stone", "Stone", "Null", "Stone", "Stone", "Null", "Null", "Null", "Null", ]`**
::: tip **You need to have [inventoryhandling](configuration.md#inventoryhandling) and [terrainandmovements](configuration.md#terrainandmovements) enabled in order for this bot to work.**
::: tip **Since MCC does not yet support accurate calculation of the collision volume of blocks, all blocks are considered as complete cubes when obtaining the position of the lookahead.**
::: tip **To use the automatic rod switching and durability check feature, you need to enable [inventoryhandling](configuration.md#inventoryhandling).**
::: tip **Note: To adjust the position or angle after catching a fish, you need to enable [terrainandmovements](configuration.md#terrainandmovements).**
**Steps for using this bot (with the default setting)**
1. Hold a fishing rod and aim towards the sea before login with MCC
2. Make sure `AutoFish` is `enabled` in config file
3. Login with MCC
4. You will be able to see the log "Fishing will start in 3.0 second(s).".
-**Settings:**
**Section:****`ChatBot.AutoFishing`**
#### `Enabled`
-**Description:**
This setting specifies if the Auto Fishing Chat Bot is enabled.
-**Available values:**`true` and `false`.
-**Type:**`boolean`
-**Default:**`false`
#### `Antidespawn`
-**Description:**
This option may be used in some special cases, so if it has not been modified before, leave the default value.
-**Available values:**`true` and `false`.
-**Type:**`boolean`
-**Default:**`false`
#### `Mainhand`
-**Description:**
Whether to use the main hand or off hand to hold the rod.
-**Available values:**
-`true` (Main Hand)
-`false` (Off Hand)
-**Type:**`boolean`
-**Default:**`true`
#### `Auto_Start`
-**Description:**
Whether to start fishing automatically after joining the game or switching worlds.
-**Available values:**`true` and `false`.
-**Type:**`boolean`
-**Default:**`true`
#### `Cast_Delay`
-**Description:**
Wait how many seconds after successfully catching a fish before recasting the rod.
-**Type:**`float`
-**Default:**`0.4`
#### `Fishing_Delay`
-**Description:**
Effective only when `auto_start = true`.
After joining the game or switching worlds, wait how many seconds before starting to fish automatically.
-**Type:**`float`
-**Default:**`3.0`
#### `Fishing_Timeout`
-**Description:**
How long the fish bite is not detected is considered a timeout. It will re-cast after the timeout.
-**Type:**`float`
-**Default:**`300.0`
#### `Durability_Limit`
-**Description:**
Will not use rods with less durability than this (full durability is 64).
Set to zero to disable this feature.
**Type/Available values:** An integer number from `0` to `64`.
-**Default:**`2`
#### `Auto_Rod_Switch`
-**Description:**
Switch to a new rod from inventory after the current rod is unavailable.
-**Available values:**`true` and `false`.
-**Type:**`boolean`
-**Default:**`true`
#### `Stationary_Threshold`
-**Description:**
For each movement of the fishhook entity (entity movement packet), if the distance on both X and Z axes is below this threshold it will be considered as stationary.
This is to avoid being detected as a bite during the casting of the hook.
**If set too high, it will cause the rod to be reeled in while casting.**
**If set too low, it will result in not detecting a bite.**
-**Type:**`float`
-**Default:**`0.001`
#### `Hook_Threshold`
-**Description:**
For each movement of the fishhook entity (entity movement packet), if it is stationary (check `stationary_threshold`) and its movement on the Y-axis is greater than this threshold, it will be considered to have caught a fish.
If it is set too high, it will cause normal bites to be ignored.
If set too low, it can cause small fluctuations in the hook to be recognized as bites.
-**Type:**`float`
-**Default:**`0.2`
#### `Log_Fish_Bobber`
-**Description:**
When turned on it will be print a log every time a fishhook entity movement packet is received.
If auto-fishing does not work as expected, turn this option on to adjust `stationary_threshold` and `hook_threshold`, or create an issue and attach these logs.
-**Available values:**`true` and `false`.
-**Type:**`boolean`
-**Default:**`false`
#### `Enable_Move`
-**Description:**
Some plugins do not allow the player to fish in one place for a long time. This setting allows the player to change position/angle after each catch.
Each position is added as a new `[[ChatBot.AutoFishing.Movements]]` subsection, more on that bellow.
-**Available values:**`true` and `false`.
-**Type:**`boolean`
-**Default:**`false`
### Adding a position/movement
Each position/movement is added as a new `[[ChatBot.AutoFishing.Movements]]` subsection of `[ChatBot.AutoFishing]`.
**Avaliable settings/options:**
-`XYZ`
This setting specifies at location the bot should move to.
The type of this setting is `inline table`, that has the following sub-settings/options:
-`x` - X coordinate, the type is `double` (eg. `123.0`)
-`y` - Y coordinate, the type is `double` (eg. `64.0`)
-`z` - Z coordinate, the type is `double` (eg. `-654.0`)
**Example**:
```toml
XYZ = { x = 123.0, y = 64.0, z = -654.0 }
```
-`facing`
This setting specifies at which angle the bot will look at when he arrives to this position/location.
The type of this setting is `inline table`, that has the following sub-settings/options:
-`yaw` - The type is `double` (eg. `12.34`)
-`pitch` - The type is `double` (eg. `-23.45`)
**Example**:
```toml
facing = { yaw = 12.34, pitch = -23.45 }
```
#### Full example
```toml
[[ChatBot.AutoFishing.Movements]]
facing = { yaw = 12.34, pitch = -23.45 }
[[ChatBot.AutoFishing.Movements]]
XYZ = { x = 123.45, y = 64.0, z = -654.32 }
facing = { yaw = -25.14, pitch = 36.25 }
```
## Auto Relog
-**Description:**
Make MCC automatically relog when disconnected by the server, for example because the server is restating.
-**Settings:**
**Section:****`ChatBot.AutoRelog`**
#### `Enabled`
-**Description:**
This setting specifies if the Auto Relog Chat Bot is enabled.
-**Available values:**`true` and `false`.
-**Type:**`boolean`
-**Default:**`false`
#### `Delay`
-**Description:**
The delay time before joining the server.
If the `min` and `max` are the same, the time will be consistent, however, if you want a random time, you can set `min` and `max` to different values to get a random time. The time format is in seconds, and the type is double. (eg. `37.0`)
-**Format:**`{ min = <seconds (double)>, max = <seconds (double)> }`
::: warning **This bot may get spammy depending on your rules, although the global [messagecooldown](configuration.md#messagecooldown) setting can help you avoiding accidental spam.**
This setting specifies if the Auto Respond Chat Bot is enabled.
-**Available values:**`true` and `false`.
-**Type:**`boolean`
-**Default:**`false`
#### `Matches_File`
-**Description:**
This setting specifies the path to the file which contains the list of rules for detecting of keywords and responding on them.
To find out how to configure the rules, take a look at the [`sample-matches.ini`](https://github.com/MCCTeam/Minecraft-Console-Client/blob/master/MinecraftClient/config/sample-matches.ini) which has very detailed examples and a lot of comments.
_PS: In the future we will document the rules here with examples too._
::: tip **This file is not created by default, we recommend making a clone of the [`sample-matches.ini`](https://github.com/MCCTeam/Minecraft-Console-Client/blob/master/MinecraftClient/config/sample-matches.ini) and changing it according to your needs.**
::: tip **The bot can be slow at times, you need to walk with a normal speed and to sometimes stop for it to be able to keep up with you, it's similar to making animals follow you when you're holding food in your hand. This is due to a slow pathfinding algorithm, we're working on getting a better one. You can tweak the update limit and find what works best for you. (NOTE: Do not but a very low one, because you might achieve the opposite, this might clog the thread for terrain handling) and thus slow the bot even more.**
::: tip **You need to have [terrainandmovements](configuration.md#terrainandmovements) and [entityhandling](configuration.md#entityhandling) enabled in order for this bot to work.**
This setting specifies if the Follow Player Chat Bot is enabled.
-**Available values:**`true` and `false`.
-**Type:**`boolean`
-**Default:**`false`
#### `Update_Limit`
-**Description:**
The rate at which the bot does calculations (second).
You can tweak this if you feel the bot is too slow.
-**Type:**`float`
-**Default:**`1.5`
#### `Stop_At_Distance`
-**Description:**
Do not follow the player if he is in the range of `X` blocks (prevents the bot from pushing a player in an infinite loop).
-**Type:**`float`
-**Default:**`3.0`
## Hangman
-**Description:**
Hangman game is one of the first bots ever written for MCC, to demonstrate ChatBot capabilities.
Create a file with words to guess (examples: [`words-en.txt`](https://github.com/MCCTeam/Minecraft-Console-Client/blob/master/MinecraftClient/config/hangman-en.txt), [`words-fr.txt`](https://github.com/MCCTeam/Minecraft-Console-Client/blob/master/MinecraftClient/config/hangman-fr.txt)) and set it in config inside the `[Hangman]` section.
Also set `enabled` to `true`, then, add your username in the `botowners` INI setting, and finally, connect to the server and use `/tell <bot username> start` to start the game.
::: tip **If the bot does not respond to bot owners, see the [Detecting chat messages](https://github.com/MCCTeam/Minecraft-Console-Client/tree/master/MinecraftClient/config#detecting-chat-messages) section.**
::: warning **The bot identifies players by their name (Not by UUID!). A nickname plugin or a Minecraft rename may cause mails going to the wrong player! Never write something to the bot you wouldn't say in the normal chat (You have been warned!).**
- The Mailer bot can relay messages between servers.
- To set up a network of two or more bots, launch several instances with the bot activated and the same database.
- If you launch two instances from one .exe they should synchronize automatically to the same file.
***Settings:**
**Section:****`ChatBot.Mailer`**
#### `Enabled`
-**Description:**
This setting specifies if the Mailer Chat Bot is enabled.
-**Available values:**`true` and `false`.
-**Type:**`boolean`
-**Default:**`false`
#### `DatabaseFile`
-**Description:**
This setting specifies the path to the file where the Mailer Chat Bot will store the mails.
This file will be auto created by the Mailer Chat Bot.
-**Default:**`MailerDatabase.ini`
#### `IgnoreListFile`
-**Description:**
This setting specifies the path to the file where the Mailer Chat Bot will load people who are to be ignored by the Chat Bot. If you want to prevent someone from using this chat bot, add him in this file by writing his nickname on a new line.
This file will be auto created by the Mailer Chat Bot.
-**Default:**`MailerIgnoreList.ini`
#### `PublicInteractions`
-**Description:**
This setting specifies if the Mailer Chat Bot should be interacted with in the public chat (in addition to private messages).
-**Available values:**`true` and `false`.
-**Type:**`boolean`
-**Default:**`false`
#### `MaxMailsPerPlayer`
-**Description:**
This setting specifies how many mails the Mailer Chat Bot should store per player at maximum.
-**Type:**`integer`
-**Default:**`10`
#### `MaxDatabaseSize`
-**Description:**
This setting specifies the maximum database file size of Mailer Chat Bot in Kilobytes.
-**Type:**`integer`
-**Default:**`10000` (10 MB)
#### `MailRetentionDays`
-**Description:**
This setting specifies how long should the Mailer Chat Bot save/store messages for (in days).
-**Type:**`integer`
-**Default:**`30`
## Map
-**Description:**
This Chat Bot allows you to render items maps into `.jpg` images.
This is useful for solving captchas on servers which require it, or saving the map art into an image.
The maps are **rendered** into `Rendered_Maps` folder.
::: warning **This bot has only been tested on Windows 10, it may not work on Linux or Mac OS due to .NET BitMap API. We're looking forward to swap the underlaying Bitmap API dependency with a library.**
::: warning **On some versions older than 1.17 this could cause some performance issue on older hardware if there a lot of maps being rendered, since map updates are sent multiple times a second. Be careful.**
This setting specifies if the Map Chat Bot should automatically delete rendered maps when un-loaded or reloaded.
-**Available values:**`true` and `false`.
-**Type:**`boolean`
-**Default:**`true`
#### `Notify_On_First_Update`
-**Description:**
This setting specifies if the Map Chat Bot should notify you when it got a map from the server for the first time.
-**Available values:**`true` and `false`.
-**Type:**`boolean`
-**Default:**`false`
## PlayerList Logger
-**Description:**
Log the list of players periodically into a textual file.
-**Settings:**
**Section:****`ChatBot.PlayerListLogger`**
#### `Enabled`
-**Description:**
This setting specifies if the PlayerList Logger Chat Bot is enabled.
-**Available values:**`true` and `false`.
-**Default:**`false`
#### `File`
-**Description:**
This setting specifies the name of the player list Log file that will be created.
-**Default:**`playerlog.txt`
#### `Delay`
-**Description:**
Save the list of players every how many seconds.
-**Type:**`float`
-**Default:**`60.0`
## Remote Control
-**Description:**
Send MCC console commands to your bot through server PMs (`/tell`).
You need to have [ChatFormat](configuration.md#chat-format) working correctly and add yourself in [botowners](configuration.md#botowners) to use the bot.
Will trigger the task when you login the first time.
**Available values**: `true` and `false`
**Type**: `boolean`
-`Trigger_On_Login`
Will trigger the task each time you login.
**Available values**: `true` and `false`
**Type**: `boolean`
-`Trigger_On_Times`
This will enable the task to trigger at exact time(s) you want.
The type of this setting is `inline table`, that has the following sub-settings/options:
-`Enable` - Enables/Disables the setting (Boolean, so either `true` or `false`)
-`Times` - An array/list of times on which the task should run/trigger (each element is of the [Local Time](https://toml.io/en/v1.0.0#local-time) type, eg. `14:00:00`, so: `hours:minutes:seconds`)
This will enable the task to trigger at certain interval which you've defined.
The type of this setting is `inline table`, that has the following sub-settings/options:
-`Enable` - Enables/Disables the setting (Boolean, so either `true` or `false`)
-`MinTime` - Time in seconds (the type is `double`, eg. `3.14`)
-`MaxTime` - Time in seconds (the type is `double`, eg. `3.14`)
**If `MinTime` and `MaxTime` are the same, the interval will be consistent, however if they are not, the ChatBot will generate a random interval in between those two numbers provided, each time the task is run.**