HomeJavaModsChat Moderator - LOCAL AI
Chat Moderator - LOCAL AI
ModsJava

Chat Moderator - LOCAL AI

by Bobcat · on Modrinth

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…

⬇ Download on Modrinth

Chat Moderator – AI-Assisted Chat Moderation for Paper 1.21

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.

Features

Installation

  1. Drop ChatModer.jar into your server plugins/ directory
  2. Restart the server to generate plugins/ChatModer/config.yml
  3. (Optional) Add an ONNX model folder under plugins/ChatModer/models/ and point the config to the ONNX file

AI Model Setup (Hugging Face RoBERTa)

ChatModer supports Hugging Face RoBERTa ONNX models, e.g. protectai/unbiased-toxic-roberta-onnx.

Create a folder like:

plugins/ChatModer/models/unbiased-toxic-roberta-onnx/

Put these files inside:

Config snippet:

moderation:
  ai:
    enabled: true
    model_path: plugins/ChatModer/models/unbiased-toxic-roberta-onnx/model_quantized.onnx
    max_sequence_length: 128
    async_threads: 2
    timeout_ms: 500

The tokenizer/config are auto-loaded from the same folder as the ONNX.

Label Mapping

Modes

moderation:
  enabled: true
  mode: hybrid   # regex | ai-only | hybrid
  ai:
    enabled: true
    weight: 0.8

Database & Autosave

Stats are persisted to SQLite by default or MySQL if configured. The plugin can auto-migrate existing SQLite stats to MySQL.

database:
  type: sqlite
  sqlite_file: plugins/ChatModer/data.db
  mysql:
    host: 127.0.0.1
    port: 3306
    database: chatmoder
    user: root
    password: "secret"
    useSSL: false
  sqlite_migrate_file: plugins/ChatModer/data.db

stats:
  autosave_seconds: 300

Thresholds & Punishments

Fine-tune moderation sensitivity and actions per category.

thresholds:
  profanity: 0.7
  harassment: 0.6
  hate: 0.6
  sexual: 0.7
  spam: 0.8

punishments:
  profanity: block         # warn | tempmute | kick | tempban | block | command:<cmd>
  harassment: warn
  hate: tempmute
  sexual: block
  spam: block

Logging & Review

Commands

Training Workflow (Optional)

All tools are available under /chatmod train ....

Strict Mode

For immediate blocks (e.g., high-severity tokens), enable strict rules and reload them without a restart:

/chatmod strict reload

Permissions

Performance

Privacy

All processing is local. No external API calls are made unless you enable webhooks.

Compatibility

Troubleshooting

Support

Open an issue on the project repository with logs, configs, and steps to reproduce. Provide model details if you use a custom model.

Quick facts

Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.

Verified by MCModsHub

These come from our own check of the pack file, not from the source page.

Explore more