Перейти к содержимому
Mineforgian

Данные могли устареть: источник временно недоступен, показан кэш.

Mod Detector Plugin

Monitors plugin message channels to detect client mods and optionally kick players using blocked mods.

Загрузки
967
Подписчики
2
Обновлён
18 января 2026 г.
Лицензия
GPL-3.0-or-later

Опубликован 29 декабря 2025 г.

ModDetectorPlugin

A Paper plugin that detects and manages client-side mods through plugin message channels. Server administrators can configure which mods are allowed or blocked, with options to kick players, log detections, or both.

Features

  • Mod Detection - Automatically detects client mods that register plugin message channels
  • Flexible Filtering - Whitelist or blacklist mode for granular control
  • Configurable Actions - Kick players, log detections, or both
  • Known Mod Database - Pre-configured detection patterns for popular mods
  • Custom Patterns - Add your own channel patterns with wildcard support
  • Admin Notifications - Real-time alerts when mods are detected
  • Detection Logging - Track all detections to a file for review
  • MiniMessage Support - Customizable kick messages with formatting

Requirements

  • Paper 1.21 or higher
  • Java 21 or higher

Installation

  1. Download the latest release JAR
  2. Place it in your server's plugins/ folder
  3. Restart your server
  4. Configure the plugin in plugins/ModDetectorPlugin/config.yml

Commands

Command Description Permission
/moddetector Show help moddetector.admin
/moddetector reload Reload configuration moddetector.admin
/moddetector status Show current status moddetector.admin
/moddetector mods List known mod definitions moddetector.admin
/moddetector debug Show debug status moddetector.admin

Alias: /md

Permissions

Permission Description Default
moddetector.admin Access to admin commands OP
moddetector.notify Receive detection notifications OP
moddetector.bypass Bypass mod detection (won't be kicked) false

Available Mods

The following mod IDs are pre-configured in mods.yml:

ID Mod Name Description
xaeros-worldmap Xaero's World Map Full world map mod
xaeros-minimap Xaero's Minimap Minimap mod
jade Jade Block/entity information overlay
journeymap JourneyMap Real-time mapping mod
litematica Litematica Schematic mod (via Servux)
minihud MiniHUD HUD overlay mod (via Servux)
servux Servux Server-side data provider
simple-voice-chat Simple Voice Chat Voice chat mod
noxesium Noxesium Performance/feature mod
flashback Flashback Replay recording mod
appleskin AppleSkin Food/hunger HUD additions

Detection Logging

When track-detections: true, all detections are logged to plugins/ModDetectorPlugin/detections.txt:

[2025-01-15 14:30:22] uuid-here | PlayerName | Xaero's World Map, Jade

How It Works

ModDetectorPlugin monitors plugin message channels that clients register when connecting. Many client-side mods register channels to communicate with servers, even if the server doesn't have a corresponding plugin. By detecting these channel registrations, the plugin can identify which mods a player is using.

Ченджлог

1.2.3-velocityРелиз1.21.9, 1.21.10, 1.21.11 · 18 января 2026 г.

Velocity

1.2.3Релиз1.21.9, 1.21.10, 1.21.11 · 18 января 2026 г.

Added

  • Per-Session Mod Tracking

    • Each session now records which mods the player was using
    • /md info displays the full mod list for each session
    • Useful for tracking mod usage changes over time
  • Delta Compression for Sessions

    • Sessions use smart delta compression to minimize storage
    • First session stores full mod list
    • Subsequent sessions store only changes (added/removed) if < 3 mods changed
    • Large changes (3+ mods) trigger a new full snapshot
    • Unchanged sessions store only time data
  • Enhanced /md info Display

    • Shows firstSeen timestamp
    • Shows total playtime formatted (e.g., "1h 30m")
    • Sessions display reconstructed mod list with duration

Changed

  • Storage Efficiency
    • Typical player with same mods across 100 sessions: ~3KB (was ~25KB)
    • ~88% reduction in storage for players with stable mod configurations
    • Backwards compatible with existing data (old sessions show as-is)

Example Detection Entry

{
  "uuid": "f999e944-a15d-4287-bff4-34f63a97832e",
  "username": "PlayerName",
  "mods": ["Simple Voice Chat", "Jade", "Minimap"],
  "channels": ["unknown:channel"],
  "firstSeen": "2026-01-16T17:28:01Z",
  "lastSeen": "2026-01-18T12:00:00Z",
  "totalTimePlayedSeconds": 3600,
  "sessionCount": 4,
  "sessions": [
    {"joinTime": "2026-01-16T17:27:59Z", "leaveTime": "2026-01-16T17:30:00Z", "durationSeconds": 121, "mods": ["Jade", "Voice Chat"]},
    {"joinTime": "2026-01-17T10:00:00Z", "leaveTime": "2026-01-17T10:30:00Z", "durationSeconds": 1800, "added": ["Minimap"]},
    {"joinTime": "2026-01-17T14:00:00Z", "leaveTime": "2026-01-17T14:20:00Z", "durationSeconds": 1200},
    {"joinTime": "2026-01-18T12:00:00Z", "leaveTime": "2026-01-18T12:08:00Z", "durationSeconds": 479, "removed": ["Jade"]}
  ]
}
1.2.1-velocityРелиз1.21.9, 1.21.10, 1.21.11 · 16 января 2026 г.

Velocity

1.2.1Релиз1.21.9, 1.21.10, 1.21.11 · 16 января 2026 г.

Added

  • Session Tracking

    • Tracks totalTimePlayedSeconds across all sessions
    • Records sessionCount for each player
    • Maintains sessions array with join/leave times and duration for each session
  • Clickable Player Names

    • Player names in /md players are now clickable
    • Click to run /md info <player> automatically
    • Hover text shows "Click to view channels"

Changed

  • Simplified Action Config

    • Replaced action: kick/log/both with simple kick: true/false
    • Detections are now ALWAYS logged regardless of kick setting
    • Cleaner config, same functionality
  • Smarter Detection Logging

    • Only creates new JSON entry when player's modlist changes
    • Returning players with same mods just add session info to existing entry
    • Reduces file size and improves readability
  • Separated Mods and Channels

    • mods field now contains resolved mod names (e.g., "Simple Voice Chat")
    • channels field now only contains unrecognized/unknown channels
    • /md info command updated to show both sections separately
  • Internal Improvements

    • Replaced manual JSON parsing with Gson library
    • Atomic file writes (write to .tmp, then move) prevents corruption
    • Batched I/O with 30-second flush interval reduces disk writes
    • Memory cleanup task removes stale player data every 5 minutes
    • Proper shutdown handling ensures pending writes are flushed

Fixed

  • Console no longer shows TextComponentImpl{...} blobs for admin notifications

Example Detection Entry

{
  "uuid": "f999e944-a15d-4287-bff4-34f63a97832e",
  "username": "PlayerName",
  "mods": ["Simple Voice Chat", "Noxesium", "AppleSkin", "Fabric API"],
  "channels": ["civ:handshake", "civ:class_xp"],
  "firstSeen": "2026-01-16T17:28:01Z",
  "lastSeen": "2026-01-16T17:32:04Z",
  "totalTimePlayedSeconds": 243,
  "sessionCount": 2,
  "sessions": [
    {"joinTime": "2026-01-16T17:27:59Z", "leaveTime": "2026-01-16T17:28:01Z", "durationSeconds": 2},
    {"joinTime": "2026-01-16T17:29:20Z", "leaveTime": "2026-01-16T17:32:04Z", "durationSeconds": 241}
  ]
}
1.2.0-velocityРелиз1.21.9, 1.21.10, 1.21.11 · 16 января 2026 г.

Velocity

1.2.0Релиз1.21.9, 1.21.10, 1.21.11 · 16 января 2026 г.

Added

  • Log All Channels Mode

    • New log-all-channels config option to log ALL channel registrations to file
    • Tracks every mod channel a player registers, not just blocked ones
    • No console logging for better performance
  • /md info <player> Command

    • View all registered channels for a specific player
    • Shows current session channels and historical data
    • Color-coded output: red = blocked, green = allowed
    • Displays resolved mod names alongside raw channel strings
  • /md discovered Command

    • Lists all unique channels ever discovered on the server
    • Useful for documentation and discovering new mods
    • Persists across server restarts
  • Discovered Channels File

    • New discovered-channels.json file tracks all unique channels ever seen
    • JSON array format for easy parsing
    • Automatically updated when new channels are registered
  • Smart Mod Name Resolution

    • Channel-to-mod resolution now works for ALL mods in mods.yml, not just blocked ones
    • Detection logs show pretty mod names (e.g., "Simple Voice Chat" instead of "voicechat:state")
    • Unknown channels remain as raw strings for identification

Changed

  • Consolidated Player Entries

    • detections.json now uses one entry per player (updated in place)
    • Multiple channels from the same mod are grouped together
    • Format changed from "channels" to "mods" array with resolved names
  • /md players Command

    • Now shows all registered channels when log-all-channels is enabled
    • Displays channel count per player
    • Added hint to use /md info <player> for details
  • /md status Command

    • Now shows Log All Channels setting status
  • Help Command

    • Updated to show all new commands
    • Commands now displayed with /md shorthand

Example Detection Entry

{"uuid":"f999e944-a15d-4287-bff4-34f63a97832e","username":"PlayerName","mods":["AppleSkin","Simple Voice Chat","Noxesium","Flashback","civ:class_xp"],"lastSeen":"2026-01-16T12:00:00Z"}

Example Discovered Channels

[
  "xaerominimap:main",
  "voicechat:state",
  "noxesium-v2:server_info",
  "fabric:registry/sync"
]
1.1.1-velocityРелиз1.21.9, 1.21.10, 1.21.11 · 12 января 2026 г.

Velocity

1.1.1Релиз1.21.9, 1.21.10, 1.21.11 · 12 января 2026 г.

Changed

  • JSON Detection Logging

    • Detection logs now output in JSON format instead of plain text
    • Log file changed from detections.txt to detections.json
    • Each line is a valid JSON object for easy parsing
  • Player Session Tracking

    • Logs now include player UUID
    • Session join time (sessionJoinTime) recorded when player connects
    • Session leave time (sessionLeaveTime) recorded on disconnect/kick
    • Session duration in seconds (sessionDurationSeconds) calculated automatically

Example Log Entry

{"timestamp":"2026-01-12T14:30:45Z","uuid":"f999e944-a15d-4287-bff4-34f63a97832e","username":"PlayerName","mods":["Jade","XaerosMinimap"],"sessionJoinTime":"2026-01-12T14:25:00Z","sessionLeaveTime":"2026-01-12T14:30:45Z","sessionDurationSeconds":345}

Комментарии

Загружаем…