π‘οΈ ChatProtect β Smart Profanity Filter, Progressive Auto-Mute & Chat Security
π Why ChatProtect?
Traditional chat filters are often frustrating: they block innocent words like "yaml", "camera", or "pass" just because they contain a prohibited syllable.
ChatProtect fixes this with Smart Word Boundary Matching (\b), Progressive Punishment Scaling, Muted Command Blocking, Granular Permissions, and a Complete Command Logging System.
β¨ Key Features
π§ 1. Smart Word-Boundary Filter (No False Positives!)
- Uses Regex
\b word boundary matching and Unicode Character Support.
- Words inside harmless vocabulary (e.g.
yaml, camera, pass, classic, assassin) are never false-flagged.
- Only detects standalone forbidden words and profanity.
π 2. Progressive Mute & 3-Day Auto Decay
- Violations scale automatically based on offender history:
- 1st Violation: 1 Hour Mute
- 2nd Violation: 3 Hours Mute
- 3rd Violation: 12 Hours Mute
- 4th+ Violation: 1 Day Mute (or custom duration)
- β³ 3-Day Auto Reset: If a player stays clean for 3 days (72 hours) without any violation, their penalty tier automatically resets to 0!
π 3. Flexible Time Duration Units
- No need to calculate raw seconds manually!
- Supports intuitive time units in commands & config:
s (seconds), m (minutes), h (hours), d (days), w (weeks).
- Example commands:
/mute Player 30m Spam, /mute Player 1d Toxic, /mute Player 1w.
π« 4. Blocked Commands While Muted
- Muted players cannot bypass their mute using private messaging or whisper commands (
/msg, /tell, /w, /whisper, /r, /me, etc.).
β±οΈ 5. 2-Second Anti-Spam Cooldown
- Protects chat flow by enforcing a clean 2-second cooldown between consecutive chat messages.
π 6. Full File Logging & Audit Trail
mutes.log: Logs every mute with exact timestamps, target player, muter attribution (Staff vs ChatProtect), violation count, and matched profanity.
logs/commands-YYYY-MM-DD.log: Logs every command executed on your server with automatic password masking for /login and /register.
π» Commands & Permissions
| Command |
Permission |
Description |
Default |
/mute <player> [time] [reason] |
chatprotect.mute |
Mutes a player with duration and reason |
op |
/unmute <player> |
chatprotect.unmute |
Unmutes a player |
op |
/chatprotect mutelist |
chatprotect.mutelist |
Lists all active muted players |
op |
/chatprotect resetviolations <player> |
chatprotect.resetviolations |
Resets a player's violation counter |
op |
/chatprotect reload |
chatprotect.reload |
Reloads configuration & regex patterns |
op |
| All Commands Access |
chatprotect.admin |
Master admin permission (grants all sub-permissions) |
op |
| Bypass Filter & Mute |
chatprotect.bypass |
Bypasses all chat filters, cooldowns, and mutes |
op |
βοΈ Configuration Preview (config.yml)
# ==========================================
# ChatProtect Configuration
# ==========================================
# 1. Progressive Mute Settings
progressive-mute:
enabled: true
reset-after-days: 3
durations:
1: "1h" # 1st Violation: 1 Hour
2: "3h" # 2nd Violation: 3 Hours
3: "12h" # 3rd Violation: 12 Hours
4: "1d" # 4th+ Violation: 24 Hours
# 2. Blacklist of Forbidden Words
blacklist:
- "fuck"
- "bitch"
- "asshole"
- "bastard"
- "cunt"
- "dick"
- "pussy"
- "shit"
# Add your custom words or variations here
# 3. Blocked Commands While Muted
blocked-commands:
- "/msg"
- "/tell"
- "/w"
- "/whisper"
- "/r"
- "/reply"
- "/me"
- "/mail"
# 4. Chat Cooldown
cooldown-seconds: 2
# 5. Command Logging (logs/ folder)
command-logging:
enabled: true
log-folder: "logs"
ignored-commands:
- "/login"
- "/register"
- "/l"
- "/reg"
- "/changepassword"