{"id":38741,"date":"2026-06-01T23:08:23","date_gmt":"2026-06-01T20:08:23","guid":{"rendered":"https:\/\/vpesports.com\/minecraft\/mods\/chat-moderator-local-ai\/"},"modified":"2026-06-01T23:08:23","modified_gmt":"2026-06-01T20:08:23","slug":"chat-moderator-local-ai","status":"publish","type":"mod","link":"https:\/\/vpesports.com\/minecraft\/mods\/chat-moderator-local-ai\/","title":{"rendered":"Chat Moderator &#8211; LOCAL AI"},"content":{"rendered":"<p># Chat Moderator \u2013 AI-Assisted Chat Moderation for Paper 1.21<\/p>\n<p>A lightweight, free, AI-assisted chat moderation plugin for Paper 1.21 Minecraft servers. ChatMod combines fast regex\/language filtering with an optional offline ONNX-based classifier to accurately moderate toxic, hateful, sexual, and harassing messages without paid APIs.<\/p>\n<p>## Features<\/p>\n<p>&#8211; Hybrid moderation: regex + optional RoBERTa ONNX AI<br \/>\n&#8211; Identity-aware hate detection (no API keys required)<br \/>\n&#8211; Language detection and blocking<br \/>\n&#8211; Tunable thresholds, punishments, and strict mode<br \/>\n&#8211; Admin tools for review, training, and status<br \/>\n&#8211; Persistent stats with autosave (SQLite\/MySQL) and auto-migration<br \/>\n&#8211; File\/DB logging and review tools<br \/>\n&#8211; Performance-optimized with async classification and caching<br \/>\n&#8211; Works fully offline (no paid APIs)<br \/>\n&#8211; Highly configurable and extensible<\/p>\n<p>## Installation<\/p>\n<p>1. Drop `ChatModer.jar` into your server `plugins\/` directory<br \/>\n2. Restart the server to generate `plugins\/ChatModer\/config.yml`<br \/>\n3. (Optional) Add an ONNX model folder under `plugins\/ChatModer\/models\/` and point the config to the ONNX file<\/p>\n<p>## AI Model Setup (Hugging Face RoBERTa)<\/p>\n<p>ChatModer supports Hugging Face RoBERTa ONNX models, e.g. `protectai\/unbiased-toxic-roberta-onnx`.<\/p>\n<p>Create a folder like:<br \/>\n&#8220;`<br \/>\nplugins\/ChatModer\/models\/unbiased-toxic-roberta-onnx\/<br \/>\n&#8220;`<br \/>\nPut these files inside:<br \/>\n&#8211; `model_quantized.onnx` (recommended) or `model.onnx`<br \/>\n&#8211; `config.json` (contains id2label\/label2id)<br \/>\n&#8211; `tokenizer.json` (preferred), or `vocab.json` + `merges.txt`<br \/>\n&#8211; Optional: `tokenizer_config.json`, `special_tokens_map.json`<\/p>\n<p>Config snippet:<br \/>\n&#8220;`yaml<br \/>\nmoderation:<br \/>\n  ai:<br \/>\n    enabled: true<br \/>\n    model_path: plugins\/ChatModer\/models\/unbiased-toxic-roberta-onnx\/model_quantized.onnx<br \/>\n    max_sequence_length: 128<br \/>\n    async_threads: 2<br \/>\n    timeout_ms: 500<br \/>\n&#8220;`<br \/>\nThe tokenizer\/config are auto-loaded from the same folder as the ONNX.<\/p>\n<p>### Label Mapping<br \/>\n&#8211; `obscene` -> `profanity`<br \/>\n&#8211; `insult`\/`threat` -> `harassment`<br \/>\n&#8211; `sexual_explicit` -> `sexual`<br \/>\n&#8211; `identity_attack` -> `hate`<br \/>\n&#8211; `toxicity`\/`severe_toxicity` boost profanity\/harassment slightly<br \/>\n&#8211; Identity-only labels (e.g., `black`, `muslim`) are not flagged by themselves; they serve as context when combined with insult\/toxicity<\/p>\n<p>## Modes<\/p>\n<p>&#8211; __regex__: Only regex\/wordlist heuristics<br \/>\n&#8211; __ai-only__: Only ONNX model (if enabled); still uses language blocking and whitelist<br \/>\n&#8211; __hybrid__ (recommended): Combine regex + AI; AI score can be weighted via `moderation.ai.weight`<\/p>\n<p>&#8220;`yaml<br \/>\nmoderation:<br \/>\n  enabled: true<br \/>\n  mode: hybrid   # regex | ai-only | hybrid<br \/>\n  ai:<br \/>\n    enabled: true<br \/>\n    weight: 0.8<br \/>\n&#8220;`<\/p>\n<p>## Database &#038; Autosave<\/p>\n<p>Stats are persisted to SQLite by default or MySQL if configured. The plugin can auto-migrate existing SQLite stats to MySQL.<\/p>\n<p>&#8220;`yaml<br \/>\ndatabase:<br \/>\n  type: sqlite<br \/>\n  sqlite_file: plugins\/ChatModer\/data.db<br \/>\n  mysql:<br \/>\n    host: 127.0.0.1<br \/>\n    port: 3306<br \/>\n    database: chatmoder<br \/>\n    user: root<br \/>\n    password: &#8220;secret&#8221;<br \/>\n    useSSL: false<br \/>\n  sqlite_migrate_file: plugins\/ChatModer\/data.db<\/p>\n<p>stats:<br \/>\n  autosave_seconds: 300<br \/>\n&#8220;`<\/p>\n<p>## Thresholds &#038; Punishments<\/p>\n<p>Fine-tune moderation sensitivity and actions per category.<\/p>\n<p>&#8220;`yaml<br \/>\nthresholds:<br \/>\n  profanity: 0.7<br \/>\n  harassment: 0.6<br \/>\n  hate: 0.6<br \/>\n  sexual: 0.7<br \/>\n  spam: 0.8<\/p>\n<p>punishments:<br \/>\n  profanity: block         # warn | tempmute | kick | tempban | block | command:<cmd><br \/>\n  harassment: warn<br \/>\n  hate: tempmute<br \/>\n  sexual: block<br \/>\n  spam: block<br \/>\n&#8220;`<\/p>\n<p>## Logging &#038; Review<\/p>\n<p>&#8211; __File logs__: JSONL written to `plugins\/ChatModer\/logs\/flags.log`<br \/>\n&#8211; __DB logs__: SQLite\/MySQL `flags` table (optional)<br \/>\n&#8211; __Review__: `\/chatmod review <player>` reads from DB if enabled, else file logs. Supports legacy pretty-printed logs and compact JSONL.<\/p>\n<p>## Commands<\/p>\n<p>&#8211; `\/chatmod toggle` \u2014 Enable\/disable moderation.<br \/>\n&#8211; `\/chatmod status` \u2014 Live stats overview.<br \/>\n&#8211; `\/chatmod review <player>` \u2014 Review recent flagged messages.<br \/>\n&#8211; `\/chatmod whitelist add|remove <word>` \u2014 Manage whitelist.<br \/>\n&#8211; `\/chatmod strict reload` \u2014 Reload strict list.<br \/>\n&#8211; `\/chatmod train add|capture|fromlog|words|stats|export` \u2014 Dataset tools.<br \/>\n&#8211; `\/chatmod stats reset confirm` \u2014 Clear in-memory stats and persist immediately.<\/p>\n<p>## Training Workflow (Optional)<\/p>\n<p>&#8211; __Capture__: record recent messages as context for training<br \/>\n&#8211; __From log__: mine flagged logs into a dataset<br \/>\n&#8211; __Words__: word frequency analysis<br \/>\n&#8211; __Stats__: training dataset stats<br \/>\n&#8211; __Export__: outputs `dataset.jsonl` ready for fine-tuning<\/p>\n<p>All tools are available under `\/chatmod train &#8230;`.<\/p>\n<p>## Strict Mode<\/p>\n<p>For immediate blocks (e.g., high-severity tokens), enable strict rules and reload them without a restart:<\/p>\n<p>&#8220;`<br \/>\n\/chatmod strict reload<br \/>\n&#8220;`<\/p>\n<p>## Permissions<\/p>\n<p>&#8211; `chatmod.admin` \u2014 Access to admin commands<br \/>\n&#8211; `chatmod.bypass` \u2014 Bypass moderation<br \/>\n&#8211; `chatmod.review` \u2014 Access review tools<\/p>\n<p>## Performance<\/p>\n<p>&#8211; Regex-only mode for minimal overhead<br \/>\n&#8211; AI runs asynchronously and uses a quantized ONNX model on CPU<br \/>\n&#8211; Token and message caching to reduce repeated work<\/p>\n<p>## Privacy<\/p>\n<p>All processing is local. No external API calls are made unless you enable webhooks.<\/p>\n<p>## Compatibility<\/p>\n<p>&#8211; Paper 1.21 (most modern forks should work)<br \/>\n&#8211; Java 17+<br \/>\n&#8211; SQLite included; MySQL requires valid credentials<\/p>\n<p>## Troubleshooting<\/p>\n<p>&#8211; __ONNX model not loading__: Check `moderation.ai.model_path` and ensure `config.json` and `tokenizer.json` (or `vocab.json` + `merges.txt`) are in the same directory.<br \/>\n&#8211; __Classification timeout__: Increase `moderation.ai.timeout_ms` or reduce `max_sequence_length`.<br \/>\n&#8211; __High CPU__: Use `model_quantized.onnx` and keep `max_sequence_length` at 128\/256.<br \/>\n&#8211; __Review shows no entries__: Ensure logging is enabled (file or DB) and that your logs aren\u2019t empty.<\/p>\n<p>## Support<\/p>\n<p>Open an issue on the project repository with logs, configs, and steps to reproduce. Provide model details if you use a custom model.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>ChatModer is a lightweight AI chat moderation plugin for Paper 1.21 that combines regex filtering with optional offline ONNX models to block toxic and harmful messages all without paid APIs.<\/p>\n","protected":false},"featured_media":38742,"template":"","meta":{"_minecraft_slug":"chat-moderator-local-ai","_minecraft_project_id":"uIdj1nvj","_minecraft_author":"Bobcat","_minecraft_license":"LicenseRef-All-Rights-Reserved","_minecraft_downloads":154,"_minecraft_follows":4,"_minecraft_client_side":"unsupported","_minecraft_server_side":"required","_minecraft_storage_type":"zip","_minecraft_archive_name":"chat-moderator-local-ai.zip","_minecraft_size_bytes":103602494,"_minecraft_version_count":1,"_minecraft_updated_at":"2026-05-16T13:24:43.776240Z","_minecraft_date_created":"2025-09-08T08:18:26.583521Z","_minecraft_date_modified":"2025-09-07T15:02:17.446501Z","_minecraft_project_url":"https:\/\/modrinth.com\/mod\/chat-moderator-local-ai","_minecraft_icon_attachment_id":38742,"_minecraft_imported_at":"2026-06-01T20:08:24+00:00","_minecraft_import_hash":"2d7698fbd8f7e0cdfe9654b427b76e6a","_minecraft_versions":"","_minecraft_links":"","_minecraft_gallery":"","_minecraft_api_metadata":""},"mod_category":[127],"mod_loader":[132],"minecraft_version":[62,37,73,74,38,78,79,80,81],"class_list":["post-38741","mod","type-mod","status-publish","has-post-thumbnail","hentry","mod_category-paper","mod_loader-paper","minecraft_version-1-21","minecraft_version-1-21-1","minecraft_version-1-21-2","minecraft_version-1-21-3","minecraft_version-1-21-4","minecraft_version-1-21-5","minecraft_version-1-21-6","minecraft_version-1-21-7","minecraft_version-1-21-8"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Chat Moderator - LOCAL AI - Minecraft<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/vpesports.com\/minecraft\/mods\/chat-moderator-local-ai\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Chat Moderator - LOCAL AI - Minecraft\" \/>\n<meta property=\"og:description\" content=\"ChatModer is a lightweight AI chat moderation plugin for Paper 1.21 that combines regex filtering with optional offline ONNX models to block toxic and harmful messages all without paid APIs.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/vpesports.com\/minecraft\/mods\/chat-moderator-local-ai\/\" \/>\n<meta property=\"og:site_name\" content=\"Minecraft\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/chat-moderator-local-ai\\\/\",\"url\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/chat-moderator-local-ai\\\/\",\"name\":\"Chat Moderator - LOCAL AI - Minecraft\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/chat-moderator-local-ai\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/chat-moderator-local-ai\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/wp-content\\\/uploads\\\/2026\\\/06\\\/chat-moderator-local-ai-icon-1e2758a71d6777c26b858bfed92567eba5966e23_96.webp\",\"datePublished\":\"2026-06-01T20:08:23+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/chat-moderator-local-ai\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/chat-moderator-local-ai\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/chat-moderator-local-ai\\\/#primaryimage\",\"url\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/wp-content\\\/uploads\\\/2026\\\/06\\\/chat-moderator-local-ai-icon-1e2758a71d6777c26b858bfed92567eba5966e23_96.webp\",\"contentUrl\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/wp-content\\\/uploads\\\/2026\\\/06\\\/chat-moderator-local-ai-icon-1e2758a71d6777c26b858bfed92567eba5966e23_96.webp\",\"width\":96,\"height\":96},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/chat-moderator-local-ai\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Mods\",\"item\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Chat Moderator &#8211; LOCAL AI\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/#website\",\"url\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/\",\"name\":\"Minecraft\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Chat Moderator - LOCAL AI - Minecraft","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/vpesports.com\/minecraft\/mods\/chat-moderator-local-ai\/","og_locale":"en_US","og_type":"article","og_title":"Chat Moderator - LOCAL AI - Minecraft","og_description":"ChatModer is a lightweight AI chat moderation plugin for Paper 1.21 that combines regex filtering with optional offline ONNX models to block toxic and harmful messages all without paid APIs.","og_url":"https:\/\/vpesports.com\/minecraft\/mods\/chat-moderator-local-ai\/","og_site_name":"Minecraft","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/vpesports.com\/minecraft\/mods\/chat-moderator-local-ai\/","url":"https:\/\/vpesports.com\/minecraft\/mods\/chat-moderator-local-ai\/","name":"Chat Moderator - LOCAL AI - Minecraft","isPartOf":{"@id":"https:\/\/vpesports.com\/minecraft\/#website"},"primaryImageOfPage":{"@id":"https:\/\/vpesports.com\/minecraft\/mods\/chat-moderator-local-ai\/#primaryimage"},"image":{"@id":"https:\/\/vpesports.com\/minecraft\/mods\/chat-moderator-local-ai\/#primaryimage"},"thumbnailUrl":"https:\/\/vpesports.com\/minecraft\/wp-content\/uploads\/2026\/06\/chat-moderator-local-ai-icon-1e2758a71d6777c26b858bfed92567eba5966e23_96.webp","datePublished":"2026-06-01T20:08:23+00:00","breadcrumb":{"@id":"https:\/\/vpesports.com\/minecraft\/mods\/chat-moderator-local-ai\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/vpesports.com\/minecraft\/mods\/chat-moderator-local-ai\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/vpesports.com\/minecraft\/mods\/chat-moderator-local-ai\/#primaryimage","url":"https:\/\/vpesports.com\/minecraft\/wp-content\/uploads\/2026\/06\/chat-moderator-local-ai-icon-1e2758a71d6777c26b858bfed92567eba5966e23_96.webp","contentUrl":"https:\/\/vpesports.com\/minecraft\/wp-content\/uploads\/2026\/06\/chat-moderator-local-ai-icon-1e2758a71d6777c26b858bfed92567eba5966e23_96.webp","width":96,"height":96},{"@type":"BreadcrumbList","@id":"https:\/\/vpesports.com\/minecraft\/mods\/chat-moderator-local-ai\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/vpesports.com\/minecraft\/"},{"@type":"ListItem","position":2,"name":"Mods","item":"https:\/\/vpesports.com\/minecraft\/mods\/"},{"@type":"ListItem","position":3,"name":"Chat Moderator &#8211; LOCAL AI"}]},{"@type":"WebSite","@id":"https:\/\/vpesports.com\/minecraft\/#website","url":"https:\/\/vpesports.com\/minecraft\/","name":"Minecraft","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/vpesports.com\/minecraft\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/mod\/38741","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/mod"}],"about":[{"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/types\/mod"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/media\/38742"}],"wp:attachment":[{"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/media?parent=38741"}],"wp:term":[{"taxonomy":"mod_category","embeddable":true,"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/mod_category?post=38741"},{"taxonomy":"mod_loader","embeddable":true,"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/mod_loader?post=38741"},{"taxonomy":"minecraft_version","embeddable":true,"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/minecraft_version?post=38741"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}