ChatControl is a complete chat management script I built for Skript 2.6.4+. It replaces
most chat plugins with a single configurable .sk file.
Version: 1.2
Requirements: Skript 2.6.4+, skript-reflect 2.6.3+, SkBee 3.2.1+, Vault + a permission plugin (e.g. LuckPerms), and my FileUtils helper script (download fileutils.sk) - required, it handles all file operations in place of the old skUtilities dependency.
Config: since v1.2 all settings are loaded from a separate
plugins/Skript/scripts/ChatControl/config.yml file (auto-created on first load). You no
longer need to edit the script itself. The default config is shown below and can be
downloaded here.
The script is also listed on SkUnity.
Features
- Customizable chat formats (regular, staff, and admin)
- First-join captcha to block bots
- Configurable chat cooldown and duplicate-message anti-spam filter
- Per-player chat colors with
/chatcolor - Per-player ignore list via
/ignoreand/unignore - Staff chat and admin chat channels (
/sc,/ac, or message indicators) - Social spy (
/ss) to see private commands - Chat mute and chat clear commands
- Banned phrase list with optional kick, loaded from a
.ymlfile - Command deny for non-admins (e.g.
/plugins,/version) - Local chat range option
- Logs chat, staff chat, admin chat, and banned-word attempts to file
- All settings and messages configured in an external
config.yml(no script edits needed)
Config
Since v1.2 ChatControl no longer uses the Skript options: section. Instead it reads every
setting from plugins/Skript/scripts/ChatControl/config.yml, which is created with sensible
defaults on first load. Download the default file here:
chatcontrol-config.yml.
The placeholders {display}, {suffix}, {color}, {player} and {message} can be used
in the chat/join/quit formats. Below is the full default config:
# ChatControl configuration. Edit these values to suit your server.
version: "1.2"
#
# Usable placeholders (in chatFormat, chatFormatStaff, chatFormatAdmin, joinMessage and quitMessage):
# {display} = the player's rank prefix (from a permission plugin such as LuckPerms)
# {suffix} = the player's rank suffix (from a permission plugin such as LuckPerms)
# {color} = the player's chosen chat color
# {player} = the player's name
# {message} = the content of the message (chat formats only)
#
# Prefix shown before ChatControl command and message text.
prefix: "&6&lChat Control &8&l» &r"
# Permission required to use /ignore.
permissionIgnore: "chat.ignore"
# Permission to bypass the chat cooldown.
permissionBypassChatCooldown: "chat.bypasschatcooldown"
# Permission to bypass the chat filter (banned words etc).
permissionBypassChatFilter: "chat.bypasschatfilter"
# Permission to use /chatcolor.
permissionChatColor: "chat.chatcolor"
# Permission to use /chatclear.
permissionChatClear: "chat.chatclear"
# Permission to use /mute and /unmute.
permissionChatMute: "chat.chatmute"
# Permission to use /socialspy.
permissionSocialSpy: "chat.socialspy"
# Permission to use and see staff chat.
permissionStaff: "chat.staff"
# Permission to use and see admin chat.
permissionAdmin: "chat.admin"
# Message shown to a player without the required permission.
permissionMessage: "&cNo Permission!"
# Format for normal chat.
chatFormat: "{display}{color}{player}{suffix}&8: {color}{message}"
# Format for staff chat messages.
chatFormatStaff: "&d&lSTAFF {display}{color}{player}{suffix}&8: {color}{message}"
# Format for admin chat messages.
chatFormatAdmin: "&c&lADMIN {display}{color}{player}{suffix}&8: {color}{message}"
# Default chat color for players who have not chosen one.
startChatColor: "&7"
# Link shown by the /discord command.
discordLink: "https://discord.gg/Bvs8drU"
# Join message shown when a player logs in.
joinMessage: "&8[&a+&8] {display}{color}{player}{suffix}"
# Quit message shown when a player logs out.
quitMessage: "&8[&c-&8] {display}{color}{player}{suffix}"
# If true, chat is limited to a radius in blocks; if false, everyone can see it.
toggleChatRange: false
# Chat range radius in blocks (only used when toggleChatRange is true).
chatRange: 50
# Seconds a player must wait between chat messages (0 disables).
chatCooldown: 1
# Characters typed in chat to send a staff chat message.
staffChatIndicator: "#"
# Characters typed in chat to send an admin chat message.
adminChatIndicator: '\'
# If true, new players must solve a captcha before they can chat.
captchaToggle: false
# Commands allowed while a player still needs to verify.
allowedCaptchaCommands: ["help", "hub", "buy", "mh"]
# Commands blocked for all players.
bannedCommands: ["pl", "plugins", "bukkit:pl", "ver", "version", "bukkit:ver", "bukkit:version", "about", "bukkit:about"]
# If true, a player who types a banned phrase gets kicked.
bannedPhraseKick: true
# If true, chat messages are logged to a file.
logMessages: true
# If true, banned word usage is logged to a file.
logBannedWords: true
How it works
The script hooks the chat event to apply formatting, filtering, and anti-bot checks, and
manages its own data (chat colors, ignore lists, mute state, social spy) in persistent
variables. On load it reads config.yml into the {yaml::cc::*} variables, and logs and
the banned words list are stored in plugins/Skript/scripts/ChatControl/.