← Back to all projects
ChatControl icon

ChatControl Featured

Skript

SkriptChatModerationAnti-BotAnti-Spam

A fully configurable chat management script: chat formatting, first-join captcha, cooldowns, anti-spam filter, staff/admin chat, social spy, banned words, and more. All settings live in a separate config.yml.

Download

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

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/.