summaryrefslogtreecommitdiff
path: root/website/src/docs/reference/message-format.md
blob: 2669adb8e1ec7795a0f9e55d90f342bcdbca82f8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
---
layout: doc
---

# Message Format

You can customize the display format of chat messages in the `messageFormat` section of `config.yml`.

## Placeholders

| Placeholder | Description | Available formats |
|-------------|-------------|-------------------|
| `{sender}` | Name of the message sender | All |
| `{recipient}` | Name of the message recipient | `directMessageFormat` |
| `{message}` | Message content | All |
| `{channel}` | Channel name | `channelMessageFormat` |
| `{server}` | Server name | `crossServerGlobalChatFormat` |

## Format List

### `directMessageFormat`

The display format for direct messages sent via `/tell` or `/reply`.

**Default:**
```
§7[§e{sender} §7>> §e{recipient}§7] §f{message}
```

**Example:** <span style="color: gray">[</span><span style="color: gold">Steve</span> <span style="color: gray">>></span> <span style="color: gold">Alex</span><span style="color: gray">]</span> <span style="color: white">Hello!</span>

### `channelMessageFormat`

The display format for messages sent in channel chat.

**Default:**
```
§7[§b#{channel}§7] §e{sender}: §f{message}
```

**Example:** <span style="color: gray">[</span><span style="color: aqua">#general</span><span style="color: gray">]</span> <span style="color: gold">Steve:</span> <span style="color: white">Hello!</span>

### `crossServerGlobalChatFormat`

The display format for cross-server global chat when using Velocity integration.

**Default:**
```
§7[§6{server}§7] §e{sender}: §f{message}
```

**Example:** <span style="color: gray">[</span><span style="color: gold">survival</span><span style="color: gray">]</span> <span style="color: gold">Steve:</span> <span style="color: white">Hello!</span>

## Color Codes

You can use color codes with the Minecraft section sign (`§`).

| Code | Color |
|------|-------|
| `§0` | Black |
| `§1` | Dark blue |
| `§2` | Dark green |
| `§3` | Dark aqua |
| `§4` | Dark red |
| `§5` | Dark purple |
| `§6` | Gold |
| `§7` | Gray |
| `§8` | Dark gray |
| `§9` | Blue |
| `§a` | Green |
| `§b` | Aqua |
| `§c` | Red |
| `§d` | Pink |
| `§e` | Yellow |
| `§f` | White |

### Formatting Codes

| Code | Effect |
|------|--------|
| `§l` | **Bold** |
| `§o` | *Italic* |
| `§n` | <u>Underline</u> |
| `§m` | ~~Strikethrough~~ |
| `§k` | Obfuscated (characters change randomly) |
| `§r` | Reset |