Skip to content

chat.yml

The public chat format, the kill count, local chat, and team chat logging.

How it plays: read the guide

Every example on this page is taken from the shipped chat.yml. Changes apply with /hcf reload.

Switch

chat.yml
# Turn this off to leave chat exactly as the server renders it, prefix and kill
# count included. Team and ally chat routing is unaffected - /team chat keeps
# working either way.
enabled: true

Off, chat is left as the server renders it. Team chat keeps working either way.

Format

chat.yml
# The line everybody sees. Placeholders:
#
#   %player%    the player's name
#   %message%   what they said
#   %prefix%    their LuckPerms prefix, or nothing if LuckPerms is absent
#   %suffix%    their LuckPerms suffix, or nothing
#   %kills%     the kills-format below, or NOTHING when they have no kills -
#               a new player reading "[0]" beside their name is just noise
#
# %message% is substituted last, so a player typing "%player%" in chat does not
# get it expanded. And what they type is shown exactly as typed - their own "&c"
# stays the two characters "&c" - unless they hold hcfcore.chat.color (operators
# do by default). Colour and obfuscated text are the tools of spam and of lines
# dressed up as staff messages, so they are granted, not assumed. The same rule
# applies in team and ally chat.
format: "%kills%%prefix%{text}%player%%suffix%{dark}: {text}%message%"

# What %kills% expands to. %value% is the number. Separate from the template so
# the brackets and the colour can be changed - or the whole thing emptied - with
# no risk to the rest of the line. The trailing &r stops the prefix inheriting
# the bracket colour.
kills-format: "{dark}[{primary}%value%{dark}]&r "
Key As shipped What it does
format %kills%%prefix%&f%player%%suffix%&7: &f%message% The public line. %prefix% and %suffix% come from LuckPerms. Must contain %message%, or it is refused
kills-format &7[&c%value%&7]&r What %kills% becomes; empty for a player with no kills

Range and logging

chat.yml
# How far a public message carries, in blocks. 0 is the whole server, which is
# the normal HCF setting; anything else makes chat local. The console always
# receives the message either way - local chat that staff cannot read in the log
# is a moderation problem, not a feature.
#
# Distances use positions copied twice a second: chat arrives off the main thread,
# where Paper forbids reading the world. Somebody who joined in the last half
# second hears everything until the next copy.
range-blocks: 0
chat.yml
# Write team and ally chat to the console and the server log, as public chat
# already is, with the team's name: a conversation staff cannot read back is a
# moderation problem (lang/en.yml, team.chat.log, is the line's format).
log-team-chat: true
Key As shipped What it does
range-blocks 0 How far public chat carries; 0 is the whole server
log-team-chat true Copy team and ally chat to the console and log

The whole shipped file

View it on GitHub.

chat.yml
# ---------------------------------------------------------------------------
# chat.yml - the public chat format
#
# /hcf reload applies changes at once.
#
# Lines "# --8<-- [start:...]" and "# --8<-- [end:...]" mark the parts the online
# documentation quotes from this file. They are comments and change nothing.
# ---------------------------------------------------------------------------

# Turn this off to leave chat exactly as the server renders it, prefix and kill
# count included. Team and ally chat routing is unaffected - /team chat keeps
# working either way.
enabled: true

# The line everybody sees. Placeholders:
#
#   %player%    the player's name
#   %message%   what they said
#   %prefix%    their LuckPerms prefix, or nothing if LuckPerms is absent
#   %suffix%    their LuckPerms suffix, or nothing
#   %kills%     the kills-format below, or NOTHING when they have no kills -
#               a new player reading "[0]" beside their name is just noise
#
# %message% is substituted last, so a player typing "%player%" in chat does not
# get it expanded. And what they type is shown exactly as typed - their own "&c"
# stays the two characters "&c" - unless they hold hcfcore.chat.color (operators
# do by default). Colour and obfuscated text are the tools of spam and of lines
# dressed up as staff messages, so they are granted, not assumed. The same rule
# applies in team and ally chat.
format: "%kills%%prefix%{text}%player%%suffix%{dark}: {text}%message%"

# What %kills% expands to. %value% is the number. Separate from the template so
# the brackets and the colour can be changed - or the whole thing emptied - with
# no risk to the rest of the line. The trailing &r stops the prefix inheriting
# the bracket colour.
kills-format: "{dark}[{primary}%value%{dark}]&r "

# How far a public message carries, in blocks. 0 is the whole server, which is
# the normal HCF setting; anything else makes chat local. The console always
# receives the message either way - local chat that staff cannot read in the log
# is a moderation problem, not a feature.
#
# Distances use positions copied twice a second: chat arrives off the main thread,
# where Paper forbids reading the world. Somebody who joined in the last half
# second hears everything until the next copy.
range-blocks: 0

# Write team and ally chat to the console and the server log, as public chat
# already is, with the team's name: a conversation staff cannot read back is a
# moderation problem (lang/en.yml, team.chat.log, is the line's format).
log-team-chat: true