The Chat module allows you fully customize chat on your server.
Global Settings
This section handles the core settings of the chat module. It sets how the plugin listens to chat events, hooks into DiscordSRV to send game messages to your Discord server, and lets you turn off Minecraft chat reports.
Global:
# Sets priority for the AsyncChatEvent (Paper) / AsyncPlayerChatEvent (Spigot) handler.
# [>] Available values: [LOWEST, LOW, NORMAL, HIGH, HIGHEST, MONITOR]
# [*] Do not touch unless you're experiencing compatibility issues or you know what you're doing.
Chat-Event-Priority: HIGH
DiscordSRV:
# Enables DiscordSRV integration.
# [*] Experimental. Currently supports only Game -> Discord messages.
Enabled: true
# Disables the Chat Reports system and verification messages on join.
Disable-Chat-Reports: true
Roleplay Commands
Optional Feature
This feature adds basic roleplay commands like /me to your server.
Roleplay-Commands:
# Adds a few roleplay-like commands if enabled.
Enabled: true
Me:
# Format for the /me command.
Format: <i><soft_aqua>%player_display_name%</soft_aqua> <gray>%message%</gray></i>
Chat Formatting
Configuration Required
This is the core of your chat appearance. It lets you create custom text "components" (like hoverable player info or clickable ranks) and insert them into chat formats. You can set up different formats for different permission groups (ranks).
If a player does not have a rank with a specific format, the plugin will use the Fallback setting.
Priority System
If a player has multiple ranks, the plugin will pick the format with the highest Priority number.
Chat:
Format:
# Here you can create custom 'components' to use in the user formats below.
# To insert a component into user format, wrap it into '%' brackets: %my_component%
# [>] Text Formations: https://nightexpressdev.com/nightcore/configuration/text-formation/
# [>] PlaceholderAPI Support: Yes
# [>] Built-in Placeholders:
# - %message% - Original message sent by a player.
# - %player_name% - Player name.
# - %player_display_name% - Player display (custom) name.
# - %player_prefix% - Player prefix (from Permissions plugin)
# - %player_suffix% - Player suffix (from Permissions plugin)
# - %player_world% - Player's world name.
Components:
player_info:
Text: '<hover:show_text:"<gray>Player: <light_purple>%player_name%</light_purple><br>Nickname: <light_purple>%player_display_name%</light_purple><br><br><gray>(Click to message)</gray></gray>"><click:suggest_command:"/msg %player_name% ">%player_display_name%</click></hover>'
rank_owner:
Text: <hover:show_text:"<gray>This player is the server <soft_yellow>Owner</soft_yellow></gray>">%player_prefix%</hover>
rank_member:
Text: <hover:show_text:"<gray>Type <soft_green>/ranks</soft_green> to view all special ranks.</gray>"><click:run_command:"/ranks">%player_prefix%</click></hover>
# Here you can create custom chat formats for players based on their permission group(s).
# [>] Options:
# - Priority: If multiple formats available, the one with the greatest priority is used.
# - Format: Chat message format. For a list of placeholders, please see the 'Format.Components' section above.
# - Ranks: List of ranks (permission group names) to which this format is applicable. Add '*' to allow any rank.
# [>] If no format is available for a player, fallbacks to the 'Format.Fallback' setting.
User:
owner:
Priority: 100
Format: '%rank_owner%%player_info%: <gray>%message%</gray>'
Ranks:
- admin
- owner
default:
Priority: 0
Format: '%rank_member%%player_info%: <gray>%message%</gray>'
Ranks:
- '*'
# Fallback chat message format used when no other format is available for a player.
# [*] Please don't rely much on this setting, instead ensure to setup your user formats properly.
Fallback: '%player_name%: %message%'
Channels
Optional Feature
This lets you create multiple chat rooms. Each channel can have its own format, permissions, distance settings, and message cooldowns.
It also lets players know if no one was around to hear their message.
You can disable this feature by setting Enabled to false.
In this case, a "single global channel emulation" from the _default_.yml file will be used to determine message formats, distance, cooldowns, and other settings.
Channels:
# Enables the Channels feature.
# This allows you to create multiple chat channels with different formats, permissions, message cooldowns, etc.
# [*] When disabled, the chat fallbacks to the _default_ channel inside the /channels/ directory and no other channel features are available to use.
Enabled: true
# Sets which channel used by default for all player messages.
# [*] If invalid channel provided, fallbacks to the _default_ channel.
Default-Channel-Id: local
# Controls whether players will get the 'Nobody heard you' message when there is no one in the channel who can hear them.
Nobody-Heard-Message: true
Conversations
Optional Feature
This feature handles private messaging between players. It lets you customize the look of incoming and outgoing whispers, and even plays sounds when messages are sent or received.
Conversations:
# Enables the Conversations feature allowing players to send private messages to each other.
Enabled: true
Sound:
# If enabled, a sound will play whenever a player receives or sends a private message.
Enabled: true
# Sound for incoming private messages.
Incoming: minecraft:block.note_block.bell;0.8;1.0
# Sound for outgoing private messages.
Outgoing: minecraft:ui.button.click;0.8;1.0
Format:
# Conversation message format used in 'Incoming' and 'Outgoing' formats below.
# [>] Text Formations: https://nightexpressdev.com/nightcore/configuration/text-formation/
# [>] PlaceholderAPI Support: Yes
# [>] Built-in Placeholders:
# - %message% - Original message sent by a player.
# - %player_name% - Player name.
# - %player_display_name% - Player display (custom) name.
# - %player_prefix% - Player prefix (from Permissions plugin)
# - %player_suffix% - Player suffix (from Permissions plugin)
# - %player_world% - Player's world name.
Basic: '%message%'
# Format for incoming private messages.
# [>] Use the %format% placeholder to insert 'basic' conversation format from the 'Format.Basic' section above
# [*] For a list of placeholders, please see the 'Format.Basic' section above.
Incoming: '<light_purple>[Whisper]</light_purple> <soft_pink>%player_display_name%: </soft_pink><gray>%format%</gray> <click:suggest_command:"/msg %player_name%"><hover:show_text:"<light_purple>Click to reply!</light_purple>"><light_purple>[⬅]</light_purple></hover></click>'
# Format for outgoing private messages.
# [>] Use the %format% placeholder to insert 'basic' conversation format from the 'Format.Basic' section above
# [*] For a list of placeholders, please see the 'Format.Basic' section above.
Outgoing: '<light_purple>[Whisper]</light_purple> <soft_pink>You ➡ %player_display_name%: </soft_pink><gray>%format%</gray>'
Mentions
Optional Feature
Lets players grab the attention of others by tagging them in chat (for example, typing @PlayerName). You can also set up special group tags like @Admin or @All.
Mentions:
# If enabled, this allows players to mention (tag) other players or entire groups in the chat.
Enabled: true
# The regex pattern used to identify mentions (tags) in a player's message. By default, this is @Something.
Prefix: '@(\w+)'
Player:
# Format for player mentions.
# [>] Text Formations: https://nightexpressdev.com/nightcore/configuration/text-formation/
# [>] Built-in Placeholders:
# - %player_name% - Player name.
# - %player_display_name% - Player display (custom) name.
# - %player_prefix% - Player prefix (from Permissions plugin)
# - %player_suffix% - Player suffix (from Permissions plugin)
# - %player_world% - Player's world name.
Format: <soft_green>@%player_display_name%</soft_green>
# Here you can create custom mentions that affects all players with certain ranks (permission groups).
# [>] Text Formations: https://nightexpressdev.com/nightcore/configuration/text-formation/
# [>] Options:
# - Format: Mention format.
# - Ranks: List of ranks (permission group names) to which this mention is applicable. Add '*' to allow any rank.
Special:
all:
Format: <soft_aqua>@All</soft_aqua>
Included-Ranks:
- '*'
admin:
Format: <soft_red>@Admin</soft_red>
Included-Ranks:
- admin
Auto-Moderation
Optional Feature
This is a set of tools to keep your chat clean. It includes filters to stop players from using too many capital letters, spamming the same messages or commands, and swearing.
AutoModeration:
UserCache:
# Sets cache lifetime (in seconds) for user content tracked by the Auto-Moderation feature.
# [>] This includes:
# - Latest message sent with timestamp.
# - Latest command used with timestamp.
# [*] Disabling the cache will break some of Auto-Moderation features (e.g. Anti-Flood).
Life-Time: 60
Anti-Caps:
# This feature forces a player's message to lowercase if the number of uppercase characters exceeds the specified threshold.
Enabled: true
# The minimum message length required for the Anti-Caps feature to trigger.
Min-Message-Length: 5
# The minimum threshold (in %) of uppercase characters in a message required for the Anti-Caps feature to trigger.
Uppercase-Threshold: 70
# List of commands for which the Anti-Caps feature will be active.
Affected-Commands:
- broadcast
- reply
- tell
- me
Anti-Flood:
# This feature prevents players from sending the same (or very similar) messages and commands within a (very) short period of time.
Enabled: true
Similarity:
# The similarity trigger threshold (in %) for the Anti-Flood feature regarding messages and commands.
# If the similarity percentage between a player's last message/command and the one they are trying to send meets or exceeds this value, the message will be blocked.
Score-Threshold: 80.0
# The quantitative trigger threshold for the Anti-Flood feature for messages and commands
# If a player sends this specific number of similar messages or commands in a row within the time specified in 'UserCache.Life-Time', further similar messages will be blocked until the cache expires.
Count-Threshold: 3
Commands:
# Sets global cooldown (in milliseconds) on command usage..
# [Default is 500ms (0.5s)]
Cooldown: 500
# List of commands excluded from the Anti-Flood feature, so players can use them without all the Anti-Flood checks and restrictions.
Command-Whitelist:
- spawn
- reply
- warp
- kit
- sethome
- tell
- home
- delhome
Profanity-Filter:
# This feature enables a filter for profanity (or any specified words) in messages and commands.
Enabled: true
# The list of rule files for the Profanity Filter.
# [>] Rule files are stored in the /rules/ folder.
# [>] You can create your own files or modify existing ones.
Rules:
- default.txt
# List of commands for which the Profanity-Filter feature will be active.
Affected-Commands:
- broadcast
- reply
- tell
- me
Profanity-Filter Rules
Filtered words are configured using .txt files located in the /rules/ directory.
For your convenience, you can create and utilize multiple .txt files to organize different word lists.
rules.txt
ass
asshole
bitch
cock+
cunt
dickhead
dick
dumbass
fag+
+fuck+
nigga
nigra
pussy
Please note that regular expressions (regex) are not used here, as they can be significantly slower.
Instead of regular expressions, the + and - prefixes/suffixes are used for advanced filtering or excluding related words and variations.
How it works:
If you want to filter any word starting with bad, use a filter like bad+.
To filter any word ending with bad, use a filter like +bad.
To filter any word containing bad anywhere within it, use the +bad+ filter.
The - symbol works in the same way, allowing you to exclude specific words from the filter (e.g., -badge).
Item Show
Optional Feature
Players can type @hand in the chat to show everyone the item they are currently holding. When other players hover over the chat message, they can see the item's details and enchantments.
ItemShow:
# This feature allows players to use a placeholder to display the item they are currently holding in the chat.
Enabled: true
# The placeholder used to display item in chat.
Placeholder: '@hand'
# Item display format.
# [>] Text Formations: https://nightexpressdev.com/nightcore/configuration/text-formation/
# [>] Placeholders:
# - %item_name% - Item display name.
# - %item_value% - Item NBT Tag (in Base64).
Format: <gray><<white><hover:show_item:"%item_value%">%item_name%</hover></white>></gray>
Spy
Optional Feature
Allows admins to secretly monitor chat channels they are not in, read private messages between other players, and see what commands players are typing.
The Spy Logger feature allows you to record all messages, commands, and private conversations entered by a player into a separate file for further analysis.
Spy:
# This feature allows you to monitor player's chat messages, used commands and conversations.
Enabled: true
# Format for Spy Modes.
# [>] Text Formations: https://nightexpressdev.com/nightcore/configuration/text-formation/
# [>] Placeholders:
# - %message% - Player message/command.
# - %target% - Target player name (for SOCIAL mode only).
# - %channel_name% - Channel name (for CHAT mode only).
# - %player_name% - Player name.
# - %player_display_name% - Player display (custom) name.
# - %player_prefix% - Player prefix (from Permissions plugin)
# - %player_suffix% - Player suffix (from Permissions plugin)
# - %player_world% - Player's world name.
Info-Format:
SOCIAL: <soft_red>[SocialSpy]</soft_red> <gray>%player_name% ➡ %target%:</gray> <gray>%message%</gray>
CHAT: <soft_red>[ChatSpy]</soft_red> <gray>[%channel_name%] %player_name%:</gray> <gray>%message%</gray>
COMMAND: <soft_red>[CommandSpy]</soft_red> <gray>%player_name% executed a command:</gray> <gray>%message%</gray>
Commands
The table below shows default command settings. Please see the Commands Guide on how to toggle and customize SunLight's commands.