> For the complete documentation index, see [llms.txt](https://axieum.gitbook.io/chatter-for-minecraft/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://axieum.gitbook.io/chatter-for-minecraft/styling/overview.md).

# 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](/chatter-for-minecraft/misc/templating.md) 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](/files/-MWlavFT86KmJiOO-P9E)

#### 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"](/files/-MWla3xicBqi_yAXN1lJ)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://axieum.gitbook.io/chatter-for-minecraft/styling/overview.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
