# Chatter Styling

Add-on for Chatter to change how players see each other's messages.

We can all agree that the classic Minecraft chat format is quite lacklustre to the point where it becomes hard to read. Chatter allows you to tweak the chat format - go ahead and add colour!

{% hint style="success" %}
Supports popular permission mods (e.g. [LuckPerms](https://luckperms.net)) for groups, prefixes and suffixes!
{% endhint %}

## Examples

{% embed url="<https://youtu.be/reGleNMf360>" %}
A demonstration of the below "Example #1" configuration
{% endembed %}

{% tabs %}
{% tab title="Example #1" %}
{% code title="config/chatter/style.json5" %}

```javascript
{
	// Chat Styles
	"chat": [
		{
			/**
			 * Reduces the scope of messages to players belonging to the listed groups
			 * Use 'player' and 'operator' if you do not have a permissions mod
			 */
			"groups": ["player"],
			// Reduces the scope of messages to players with the listed UUIDs (see https://minecraftuuid.com)
			"uuids": [],
			/**
			 * The in-game chat message JSON template (see https://minecraftjson.com)
			 * Use ${username}, ${player}, ${message}, ${group}, ${team}, ${prefix}, ${suffix}, ${world} and ${datetime[:format]}
			 */
			"template": "[\"\",{\"text\":\"${player}\",\"color\":\"yellow\",\"clickEvent\":{\"action\":\"suggest_command\",\"value\":\"/tell ${username} \"},\"hoverEvent\":{\"action\":\"show_text\",\"contents\":[\"\",{\"text\":\"Click to direct message\",\"italic\":true}]}},{\"text\":\" > \",\"color\":\"dark_gray\"},{\"text\":\"${message}\"}]",
			// True if players can use colour codes in their messages, i.e. &[0-9a-fk-or]
			"color": false
		},
		{
			/**
			 * Reduces the scope of messages to players belonging to the listed groups
			 * Use 'player' and 'operator' if you do not have a permissions mod
			 */
			"groups": ["operator"],
			// Reduces the scope of messages to players with the listed UUIDs (see https://minecraftuuid.com)
			"uuids": [],
			/**
			 * The in-game chat message JSON template (see https://minecraftjson.com)
			 * Use ${username}, ${player}, ${message}, ${group}, ${team}, ${prefix}, ${suffix}, ${world} and ${datetime[:format]}
			 */
			"template": "[\"\",{\"text\":\"${player}\",\"color\":\"red\",\"clickEvent\":{\"action\":\"suggest_command\",\"value\":\"/tell ${username} \"},\"hoverEvent\":{\"action\":\"show_text\",\"contents\":[\"\",{\"text\":\"Click to ask for support\",\"italic\":true}]}},{\"text\":\" > \",\"color\":\"dark_gray\"},{\"text\":\"${message}\"}]",
			// True if players can use colour codes in their messages, i.e. &[0-9a-fk-or]
			"color": true
		}
	]
}
```

{% endcode %}
{% endtab %}
{% endtabs %}

## Configuration

The styling add-on config file can be found under: `config/chatter/style.json5`.

{% hint style="success" %}
Made changes to the configuration? Type **`/reload`** to apply the changes immediately!
{% endhint %}

### Chat Styles

By default, the configuration will look something like this, with a placeholder style entry.

{% code title="config/chatter/style.json5" %}

```javascript
{
	// Chat Styles
	"chat": [
		{
			/**
			 * Reduces the scope of messages to players belonging to the listed groups
			 * Use 'player' and 'operator' if you do not have a permissions mod
			 */
			"groups": [],
			// Reduces the scope of messages to players with the listed UUIDs (see https://minecraftuuid.com)
			"uuids": [],
			/**
			 * The in-game chat message JSON template (see https://minecraftjson.com)
			 * Use ${username}, ${player}, ${message}, ${group}, ${team}, ${prefix}, ${suffix}, ${world} and ${datetime[:format]}
			 */
			"template": "[\"\",{\"text\":\"${player}\",\"color\":\"yellow\",\"clickEvent\":{\"action\":\"suggest_command\",\"value\":\"/tell ${username} \"},\"hoverEvent\":{\"action\":\"show_text\",\"contents\":[\"\",{\"text\":\"Click to direct message\",\"italic\":true}]}},{\"text\":\" > \",\"color\":\"dark_gray\"},{\"text\":\"${message}\"}]",
			// True if players can use colour codes in their messages, i.e. &[0-9a-fk-or]
			"color": false
		},
		// You can add more chat style entries here, just copy the content between {}
	]
}
```

{% endcode %}

#### Groups

A list of permission groups, where a player must belong to at least one when deciding to style their chat.

Currently, the following permissions mods will be automatically detected:

* [LuckPerms](https://luckperms.net)
  * Full support for permission groups, prefixes and suffixes

{% hint style="warning" %}
Don't have a permissions mod? Rather, use **`player`** and **`operator`** as group names!
{% endhint %}

{% tabs %}
{% tab title="Regular Players" %}

```javascript
"groups": ["player"],
```

{% endtab %}

{% tab title="Operators Only" %}

```javascript
"groups": ["operator"],
```

{% endtab %}

{% tab title="Both Player & Operator" %}

```javascript
"groups": ["player", "operator"],
```

{% endtab %}
{% endtabs %}

#### UUIDs

A list of player UUIDs, where a player's UUID must be contained in the given list.

{% hint style="info" %}
Don't know your UUID? Find it at [Minecraft UUID & User Search](https://minecraftuuid.com/) (non-affiliate).
{% endhint %}

{% tabs %}
{% tab title="Axieum" %}

```javascript
"uuids": ["6694a0c3-b928-429a-bb6d-ed37e3a570a1"],
```

{% endtab %}

{% tab title="Axieum, Ethernal23 and timtam929" %}

```javascript
"uuids": [
	"6694a0c3-b928-429a-bb6d-ed37e3a570a1",
	"31516bc2-6446-4af7-85fb-a64f7694314c",
	"c74bf000-eb66-496c-a578-6ce33066914d"
],
```

{% endtab %}
{% endtabs %}

#### Template

The in-game chat message template will replace the original message, making any substitutions. This field is expected to be valid JSON, just like how the `/tellraw` command works.

{% hint style="success" %}
Refer to the [templating guide](https://axieum.gitbook.io/chatter-for-minecraft/misc/templating) for instructions on substituting player names, etc.
{% endhint %}

| Token                  | Type     | Meaning                                | Example        |
| ---------------------- | -------- | -------------------------------------- | -------------- |
| `${username}`          | String   | The player's username                  | Axieum         |
| `${player}`            | String   | The player's display name              | Axieum         |
| `${message}`           | String   | The raw message contents               | Hello world!   |
| `${group}`             | String   | The player's group name                | Moderator      |
| `${prefix}`            | String   | A group or team prefix, possibly empty | &3\[Moderator] |
| `${suffix}`            | String   | A group or team suffix, possibly empty |                |
| `${team}`              | String   | The player's team display name, if set | Yellow         |
| `${team_color}`        | String   | The player's team colour name, if set  | yellow         |
| `${world}`             | String   | The player's current world name        | Overworld      |
| `${datetime[:format]}` | DateTime | The current date & time                | 01/01/2004     |

{% hint style="info" %}
Need help building a JSON text template? Check out [Minecraft JSON](https://minecraftjson.com/) (non-affiliate).
{% endhint %}

{% tabs %}
{% tab title="Yellow Players" %}

```javascript
"template": "[\"\",{\"text\":\"${player}\",\"color\":\"yellow\",\"clickEvent\":{\"action\":\"suggest_command\",\"value\":\"/tell ${username} \"},\"hoverEvent\":{\"action\":\"show_text\",\"contents\":[\"\",{\"text\":\"Click to direct message\",\"italic\":true}]}},{\"text\":\" > \",\"color\":\"dark_gray\"},{\"text\":\"${message}\"}]",
```

{% endtab %}

{% tab title="Red Operators" %}

```javascript
"template": "[\"\",{\"text\":\"${player}\",\"color\":\"red\",\"clickEvent\":{\"action\":\"suggest_command\",\"value\":\"/tell ${username} \"},\"hoverEvent\":{\"action\":\"show_text\",\"contents\":[\"\",{\"text\":\"Click to ask for support\",\"italic\":true}]}},{\"text\":\" > \",\"color\":\"dark_gray\"},{\"text\":\"${message}\"}]",
```

{% endtab %}
{% endtabs %}

![In-game result of the "Yellow Players" example above](https://2905471890-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MWJ0CGscN1zQsA_eF9d%2F-MWlJM1n_yPzkyNZBNqD%2F-MWlavFT86KmJiOO-P9E%2Fimage.png?alt=media\&token=deae1825-ca88-455f-88a6-483de612da13)

#### Colour

This flag allows matched players to use colour and formatting codes in their messages.

{% tabs %}
{% tab title="Allow Colour" %}

```javascript
"color": true
```

{% endtab %}

{% tab title="Ignore Colour" %}

```javascript
"color": false
```

{% endtab %}
{% endtabs %}

!["This should be &4red\&r text"](https://2905471890-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MWJ0CGscN1zQsA_eF9d%2F-MWlJM1n_yPzkyNZBNqD%2F-MWla3xicBqi_yAXN1lJ%2Fimage.png?alt=media\&token=f5347c36-70c0-4d2f-ad43-8f0c236362f7)
