Описание
---
**ChatMod — Advanced Server Messaging & Chat**
[Chat Mod Sprites Texture Pack](https://modrinth.com/resourcepack/chat-mod-sprites)
**ChatMod** is a server-side Fabric mod that gives administrators complete control over how the server communicates with players. Custom info commands, automated broadcasts, a rich MOTD, interactive chat with hover and click events, inline atlas sprite icons, player tagging with sound, persistent chat colours, predefined items, scheduled broadcasts — all configurable from YAML files with no restart required.
📧 Contact & Support
### 💬 Primary Support (Preferred)
**All general questions, feature requests, and non-urgent bug reports should be posted in the appropriate channels on our [Discord Server](https://discord.gg/48sZCbdHzJ).** We actively monitor it and will respond as soon as possible so the whole community benefits.
### 🆘 Urgent PM Policy
You may PM me directly **only** under specific urgent circumstances:
* **Allowed reason:** Your server is **crashing** or experiencing **critical, game-breaking errors** directly related to this mod.
* **Requirement:** You must be the **server owner**.
* **Time zone:** **(CET/CEST) — Brussels Time**
* **PM hours:** **10:00 AM – 10:00 PM Brussels Time only**
Immediate responses are not guaranteed. Private messaging is a professional courtesy, not an entitlement. Thank you for your understanding!
---
## ⚠️ Version Note — Atlas Sprite Icons
> **Atlas sprite icon features** (`[#SpriteName]`, `[#item]`, `[##item]`, custom placeholder icons, player head sprites) **require Minecraft 1.21.9 or newer.**
> Versions targeting **1.21.5 through 1.21.8 do not include these features.**
> All other features are available on all supported versions.
---
## Formatting — Used Everywhere
Every message in ChatMod — broadcasts, MOTD, info files, chat — supports the same rich formatting syntax.
| Syntax | Result |
|---|---|
| `&a`, `&b`, `&c` … | Minecraft colour codes |
| `&#RRGGBB` | Hex colour codes |
| `&l` `&o` `&n` `&m` `&k` `&r` | Bold, italic, underline, strikethrough, obfuscated, reset |
| `Text{Hover text}` | Hoverable text with a tooltip |
| `Text{Hover}` | Hover + click to run a command |
| `Text{Hover}` | Hover + click to suggest a command |
| `Text{Hover}` | Hover + click to open a URL |
| `Text{Hover}` | Hover + click to copy text |
| `&+` at line start | Centre the line in chat |
| `&=` inside a string | Insert a newline |
| `%player%` `%online_players%` `%time%` `%date%` … | Built-in placeholders |
| PlaceholderAPI placeholders | Supported when PlaceholderAPI is installed |
---
## 📢 Broadcasts
Set up automated cycling messages in `chatmod.yml`. Every broadcast entry supports four display types.
| Type | Where it appears |
|---|---|
| `CHAT` | Server chat, all players |
| `ACTION_BAR` | Above the hotbar |
| `TITLE` | Centre screen, large text |
| `BOSSBAR` | Top of screen boss bar |
**Action Bar**
- Single line stays visible for `duration_seconds` (re-sent automatically, vanilla clears it after ~3 s without this).
- Add a second line to show subtitle text in the title area alongside the action bar.
- Add more lines to cycle through them in sequence, each held for `duration_seconds`.
**Title**
Supports up to 4 lines per set:
1. Main title
2. Subtitle
3. Action bar text *(optional)*
4. Replaces the subtitle while line 3 is active *(optional)*
Add `lines1:`, `lines2:` … to cycle through multiple title screens within one broadcast entry, each displayed for `duration_seconds`.
**Boss Bar**
Multiple lines are displayed one after another as separate boss bars, each held for `duration_seconds`.
**Broadcast controls**
```yaml
broadcast_enabled: true
broadcast_interval_seconds: 300
randomize_broadcast: false # true = random order instead of sequential
```
**Per-player-count intervals** — automatically adjust the broadcast interval based on online players:
```yaml
players_5_interval_seconds: 240
players_10_interval_seconds: 180
players_25_interval_seconds: 120
```
---
## 🌅 MOTD
Greet players with a personalized message when they join. Supports all formatting, placeholders, hover and click events, and atlas sprite tokens.
```yaml
motd_enabled: true
motd_messages:
- lines:
- "&+&bWelcome, %player%!"
- "&7Playtime: &e%playtime% &7Last seen: &e%last_play_time%"
```
Use `/cm testmotd` to preview without rejoining.
---
## 📄 Custom Info Commands
Create unlimited custom text commands from YAML files — `/rules`, `/help`, `/discord`, `/info`, or any name you choose. ChatMod registers them as real server commands and supports multiple pages and named sections per file.
**Create a new one:**
```
/cm create rules
```
This generates `config/chatmod_info/rules.yml` which you edit freely, then `/cm reload`.
**Managing your info commands:**
| Command | What it does |
|---|---|
| `/rules` | Shows page 1 (or section named `page1`) |
| `/rules 2` | Shows page 2 by number |
| `/rules section_name` | Shows a named section directly |
| `/rules work` | Toggles the command on or off |
| `/rules permission` | Toggles permission requirement on or off |
| `/rules permission set chatmod.rules` | Sets the required permission node |
| `/rules alias add r` | Adds `/r` as an alias |
| `/rules alias remove r` | Removes the alias |
| `/cm list` | Lists all registered info commands |
Pages can link to each other using click actions, making full multi-section help menus easy to build.
---
## 📡 Predefined & Scheduled Broadcasts
Define reusable named broadcasts in `predefined_broadcasts.yml` and send or schedule them from commands.
```
/cm bc event_soon — send immediately to all players
/cm bcshow event_soon — preview it yourself first
/cm bclist — see all available broadcasts
/cm time 20m often 5 bc event_soon — send 5 times spread over 20 minutes
/cm time 30m bcnow CHAT Hello everyone! — send ad-hoc text after 30 minutes
```
Each predefined broadcast supports all four display types (`CHAT`, `ACTION_BAR`, `TITLE`, `BOSSBAR`), permission gating, and full formatting.
For ad-hoc one-off messages without a predefined entry:
```
/cm bcnow CHAT &aServer event starting now!
/cm bcnow TITLE &6Event! | &eGet to spawn!
/cm bcnow CHAT &eYou have been selected!
```
---
## 🎨 Atlas Sprite Icons *(1.21.9+ only)*
Render any Minecraft texture atlas sprite inline in any message — chat, MOTD, broadcasts, info files.
| Syntax | Result |
|---|---|
| `[#diamond]` | Diamond item sprite |
| `[#grass_block]` | Grass block sprite |
| `[#playerhead:Name]` | Named player's head sprite |
| `[#item]` | Sprite of the item you're holding |
| `[##item]` | Sprite only, no item name |
| `[#item:3]` | Sprite of predefined item slot 3 |
Sprite aliases and vanilla texture overrides are configured in `sprites.yml`. You can remap any token to a custom atlas path — for example, make `[#chest]` show a christmas chest texture.
Sprites work in every context: chat messages, MOTD, broadcasts, info files, hover tooltips, and as persistent chat colour prefixes.
---
## 👤 Player Identity Tokens
Reference any online player as an interactive inline element anywhere ChatMod formatting is supported.
| Syntax | Displays |
|---|---|
| `[@Name]` | Formatted player name with hover profile and click action |
| `[#@Name]` | Player head sprite + formatted name |
| `[##@Name]` | Player head sprite only |
| `[@%player%]` | Dynamic — resolves to the player viewing the message |
**Hover profiles** in `placeholders.yml` let you define different tooltips per permission group. Admins can see UUID, ping, world and balance; regular players see rank and balance. Profiles are selected based on the *named player's* permissions and support full ChatMod formatting including sprites.
---
## 🏷️ Player Tagging & Mentions
Type `@PlayerName` or `PlayerName@` in chat to tag someone. They hear a distinct ping sound and see their name highlighted. Use `@everyone` or `everyone@` to notify the whole server (different sound, separate permission).
Tag formats are configured in `placeholders.yml` under `player_tag_format` and `everyone_tag_format`.
---
## 💬 Chat Features
**Colour & formatting control** — Two separate permissions:
- `chatmod.chat.color` — allows `&0`–`&f` and `&#RRGGBB` hex in chat
- `chatmod.chat.format` — allows `&l`, `&o`, `&n`, `&m`, `&k`, `&r` in chat
Grant both, one, or neither independently.
**Persistent chat colour** — Players set a permanent colour for all their chat messages:
```
/cm chatcolor aqua
/cm chatcolor #FF5500
/cm chatcolor b ← legacy code shorthand
```
Admins can set it for other players too with the `chatmod.chatcolor.others` permission.
**Sprite prefixes** — Set an atlas sprite as your chat colour prefix *(1.21.9+)*:
```
/cm chatcolor [#dirt]
/cm chatcolor [#diamond]
/cm chatcolor player ← uses your own player head
```
**Inline item display** — Players can show their held item in chat using `[item]`, `[#item]` (with icon), or `[##item]` (icon only). Each has its own permission node.
**Inline sprite icons** — Type `[#SpriteName]` anywhere in chat to embed a sprite icon. Gated by `chatmod.chaticon`.
**Custom placeholders** — Typed shortcuts in chat that expand to formatted, interactive text with hover and click events. Defined in `placeholders.yml`.
---
## 📦 Predefined Items & GUI
Store up to 54 items per page (unlimited pages) as shared references, displayed in chat via `[item:N]`, `[#item:N]`, or `[##item:N]`.
Manage items through a visual chest GUI:
```
/cm items ← opens page 1
/cm items 2 ← opens page 2
```
Items are stored with full NBT data so custom names, lore, enchantments, and all other properties are preserved exactly.
---
## 🔧 Custom Placeholders
Define your own typed shortcuts in `placeholders.yml` that players type in chat and ChatMod expands into formatted, interactive output.
```yaml
custom_placeholders:
spawn:
typed: '[spawn]'
chatmod: '&bSpawn&r'
hover: '&bClick to teleport to spawn.'
icon: grass_block
runcommand: /spawn
```
Each placeholder supports a display text, hover tooltip, click action (run command / suggest command / open URL), and an optional sprite icon. A permission node can be required to use it.
---
## ⚙️ Configuration
All configuration is in YAML files under `config/chatmod/`. No restart needed — use `/cm reload` after any edit.
| File | Contains |
|---|---|
| `chatmod.yml` | MOTD, cycling broadcasts, intervals, randomize |
| `predefined_broadcasts.yml` | Named reusable broadcast entries |
| `placeholders.yml` | Item formats, tag formats, hover profiles, custom placeholders |
| `messages.yml` | All player-facing system messages |
| `sprites.yml` | Sprite aliases and vanilla texture overrides |
| `config/chatmod_info/*.yml` | One file per custom info command |
PlaceholderAPI placeholders (e.g. `%luckperms:prefix%`) are resolved in all contexts when PlaceholderAPI is installed. ChatMod skips the API call when a message contains none, so there is no performance overhead for plain messages.
---
## Commands
| Command | Description | Permission |
|---|---|---|
| `/cm reload` | Reload all configs without restart | `chatmod.reload` |
| `/cm create ` | Create a new info command | `chatmod.create` |
| `/cm list` | List all info commands | `chatmod.list` |
| `/cm testmotd` | Preview the MOTD | `chatmod.testmotd` |
| `/cm testbroadcast` | Trigger next cycling broadcast | `chatmod.testbroadcast` |
| `/cm bc ` | Send a predefined broadcast | `chatmod.bc.sendnamed` |
| `/cm bcnow ` | Send an ad-hoc broadcast | `chatmod.bc.now` |
| `/cm bcnow ` | Send broadcast to one player | `chatmod.bc.now` |
| `/cm bclist` | List predefined broadcasts | `chatmod.bc.list` |
| `/cm bcshow ` | Preview a predefined broadcast | `chatmod.bc.show` |
| `/cm time [often ] bc ` | Schedule a predefined broadcast | `chatmod.bc.sendnamed` |
| `/cm time [often ] bcnow ` | Schedule an ad-hoc broadcast | `chatmod.bc.now` |
| `/cm chatcolor ` | Set your persistent chat colour | `chatmod.chatcolor.self` |
| `/cm chatcolor ` | Set another player's chat colour | `chatmod.chatcolor.others` |
| `/cm items [page]` | Open predefined items GUI | `chatmod.items` |
| `/tag [message]` | Tag a player with an optional message | `chatmod.tag.command` |
---
## Permissions
Click to expand all permission nodes
### Chat
| Node | Grants |
|---|---|
| `chatmod.chat.color` | Colour codes in chat (`&0`–`&f`, hex) |
| `chatmod.chat.format` | Formatting codes in chat (`&l`, `&o`, `&n`, `&m`, `&k`, `&r`) |
| `chatmod.chatitem` | `[item]` held item name in chat |
| `chatmod.chatitem.number` | `[item:N]` predefined item name |
| `chatmod.chatitem.icon` | `[#item]` sprite + name |
| `chatmod.chatitem.icon_only` | `[##item]` sprite only |
| `chatmod.chaticon` | `[#SpriteName]` sprite icons in chat |
| `chatmod.player.tag` | Tag players with `@Name` |
| `chatmod.player.tag.everyone` | Tag `@everyone` |
### Chat Colour
| Node | Grants |
|---|---|
| `chatmod.chatcolor.self` | Set own chat colour |
| `chatmod.chatcolor.others` | Set other players' chat colour |
| `chatmod.chatcolors` | All named and hex colours (wildcard) |
| `chatmod.chatcolor.` | Specific colour (e.g. `chatmod.chatcolor.aqua`) |
| `chatmod.chatcolor.RRGGBB` | Specific hex colour (e.g. `chatmod.chatcolor.ff5500`) |
| `chatmod.chatcolor.sprites` | Any sprite as chat colour prefix |
| `chatmod.chatcolor.sprite.` | Specific sprite prefix (e.g. `chatmod.chatcolor.sprite.dirt`) |
| `chatmod.chatcolor.sprite.player` | Own player head as chat colour prefix |
### Broadcasts
| Node | Grants |
|---|---|
| `chatmod.bc.now` | Send and schedule ad-hoc broadcasts |
| `chatmod.bc.sendnamed` | Send and schedule predefined broadcasts |
| `chatmod.bc.list` | List predefined broadcasts |
| `chatmod.bc.show` | Preview predefined broadcasts |
| `chatmod.broadcast.` | Use a specific permission-gated broadcast |
### Admin
| Node | Grants |
|---|---|
| `chatmod.reload` | Reload all configs |
| `chatmod.testmotd` | Test the MOTD |
| `chatmod.testbroadcast` | Trigger cycling broadcast |
| `chatmod.create` | Create info files |
| `chatmod.list` | List info commands |
| `chatmod.items` | Open predefined items GUI (read-only) |
| `chatmod.items.edit` | Edit predefined items via GUI |
| `chatmod.items.format` | Edit chat name prefix/suffix format |
| `chatmod.name.modify` | Manage info file settings (work, alias, permission) |
| `chatmod.tag.command` | Use the `/tag` command |
| `chatmod.modinfo` | Access `/cm` help pages |
### Info Commands
| Node | Grants |
|---|---|
| `chatmod.info.` | Access a specific permission-gated info command |
### Internal (do not grant manually)
| Node | Grants |
|---|---|
| `chatmod.internal.page` | Navigate `/cm` help pages |
| `chatmod.internal.display` | Display info file content via click actions |
---
## Modpack Policy
* ✅ You **may** include ChatMod in any modpack.
* ❌ The modpack **must not be sold**.