overview
what it does
mcchat separates global chat into channels based on two player settings: country and frequency. When a player chats, only recipients in the same country and frequency will receive that message.
defaults
how it works
join initialization
On player join, mcchat ensures the player has a record in the database and then loads their country/frequency into an in-memory cache.
event: PlayerJoinEvent handler: HandlePlayerJoinInitData provider: MCChatProvider.initPlayerData(uuid) (async)
chat filtering
On chat, mcchat reads sender + recipient channel data from cache and removes any recipients not matching the sender's channel.
event: AsyncPlayerChatEvent handler: HandleChatFilter rule: same country AND same frequency
commands
/chat help
Shows the help menu.
/chat help
/chat set
Sets your country or frequency.
/chat set country TH /chat set frequency 1
chat format
Messages are displayed with channel context:
[country][frequency][player] message
Color formatting (defaults):
All formatting is configurable via config.yml:
chat:
format: "[{country}][{frequency}][{player}] {message}"
colors:
country: "&c"
frequency: "&b"
player: "&8"
message: "&f"
Available placeholders:
{country}
{frequency}
{player}
{message}
localization
Player-facing messages are sent using Component.translatable with the base key mcengine.mcchat.
Language JSON files are included under resources/lang/.