Skip to content

chat.yml

Masking a nameplate is only half the job. Plenty of plugins offer features whose whole purpose is to tell you who is nearby, and they print real names, which walks straight around the zone:

> /near
Gatien (10 blocks), Cani (16 blocks)

chat.yml lists those messages and what to write in place of the name.

chat.yml
# The text a hidden name is replaced with.
replacement: "Hidden"
# Server messages that can give a hidden player away.
# {player} marks where the name appears, * matches any other changing text.
blacklist:
- "{player} (* blocks)"
- "You were §ateleported to {player}."
- "You swapped places with {player}."

The messages worth listing are the ones that identify a player you could be facing right now. A message that merely mentions someone, without helping you work out who is who in the fight, is not a problem.

Worth listingNot worth listing
/near, and anything printing nearby playersAn event announcement naming a winner
An item that teleports you to the closest playerA death or kill message
A tracking compass naming its targetA broadcast about someone connecting
Anything printing a name together with a distanceAnything naming a player who is not in the zone

The test is simple: could a player use this message to point at someone in front of them and say “that one is Gatien”? If so, list it.

Take the message exactly as your players read it, then replace the parts that change.

The messageThe entry to write
Gatien (10 blocks), Cani (16 blocks)"{player} (* blocks)"
You were teleported to Gatien."You were teleported to {player}."
Tracking Gatien, 34 blocks away"Tracking {player}, * blocks away"

Two tokens, and everything else is matched literally:

TokenMatches
{player}A Minecraft name. This is the part that gets replaced.
*Any other changing text, as little as possible.

You do not have to worry about colours. SomaHider strips them from your entry and from the message before comparing, so write the pattern whichever way is easier to read.

Only the names of players who are hidden from the person reading. A message naming someone outside the zone goes through untouched, and a staff member with /sh bypass on reads chat exactly as it is.

One entry cleans every occurrence on the line, so the /near above needs a single rule to hide both Gatien and Cani.