AutoPunish - Advanced Minecraft Punishment System
A production-grade Minecraft plugin featuring automated moderation, advanced escalation systems, real-time synchronization, comprehensive health monitoring, and optional web panel management interface.
🌟 What's New in V2.2
Production Monitoring & Performance
- Health Monitoring System: Real-time system health checks with database, cache, and resource monitoring
- Load Testing Suite: Automated API performance benchmarking with concurrent load testing and memory stress analysis
- 3-SQLite CQRS Architecture: Advanced caching with real-time synchronization between main database and cache layers
- Performance Analytics: Request monitoring, error tracking, and automated performance recommendations
Modular Addon Architecture
- Optional Web Panel: Web interface now available as separate addon (AutoPunish-WebPanel)
- Plugin API Extensions: Enhanced APIs for third-party integrations and addon development
- Flexible Deployment: Choose core functionality or full web management based on your needs
Advanced Security & Compliance
- Rate Limiting: API endpoint protection with configurable request limits
- Input Validation: SQL injection and XSS protection across all endpoints
- Audit Trails: Enhanced logging and monitoring with conflict resolution
- Staff Authentication: Multi-level permissions for different administrative roles
🚀 Features
Core Punishment System
- Automatic Rule Enforcement: Configurable punishment rules with escalating tiers
- Severity-Based Escalation: Dynamic punishment severity based on violation history
- Multi-Punishment Types: Warn, Kick, Mute, Ban, and custom punishment types
- Time-Based Decay: Violation points decrease over time to prevent permanent escalation
Administration Features
- Approval Workflow: Sensitive operations require admin approval
- History Reset Protection: Player punishment history can only be reset with approval
- Soft Delete System: Deleted records are archived, not permanently removed
- Web Panel Interface: HTTP-based admin dashboard (port configurable)
Integration & Compatibility
- Ban Plugin Support: Native integration with LiteBans and EssentialsX
- Offline Player Support: Mojang API integration for offline player lookups
- Database Flexibility: MySQL or SQLite support with automatic migrations
- Plugin API: Full Java API for external plugin integration
Smart Moderation
- Word Filtering: Automatic punishment for censored words with bypass permissions
- Chat Monitoring: Real-time chat analysis with configurable sensitivity
- Staff Tracking: Complete audit trail of all staff actions
- Event System: Comprehensive Bukkit events for third-party plugins
📋 Commands
Player Commands
/punish <player> <rule>- Apply a punishment rule to a player/punishments [player]- View punishment history/severity [player]- Check current severity score
Administrative Commands
/punishadmin list/approve/deny <id>- Manage punishment approvals/punishadmin resetrequests- View pending history reset requests/resethistory <player> <reason>- Request player history reset (requires approval)/rulemanagement <create|edit|delete> [rule]- Manage punishment rules/punishreload- Reload configuration files
⚙️ Configuration
Basic Setup
# Database Configuration
database:
type: "sqlite" # or "mysql"
# Web Panel
web:
enabled: true
port: 8080
host: "localhost"
# Punishment Rules
rules:
spam:
1: { type: "warn", duration: "0" }
2: { type: "mute", duration: "30m" }
3: { type: "ban", duration: "1d" }
Word Filtering
word_filter:
enabled: true
censored_words:
- "badword1"
- "offensive"
rule: "spam" # Rule to apply for violations
min_severity_score: 2 # Minimum severity before filtering applies
🔧 Installation
Core Plugin Installation
- Download AutoPunish core JAR file (
autopunish-core-2.0.0.jar) - Install to your
plugins/folder - Configure
config.ymlas needed - Restart your server
Web Panel Addon (Optional)
- Download AutoPunish-WebPanel addon JAR file (
autopunish-webpanel-1.0.0.jar) - Install to your
plugins/folder alongside the core plugin - Restart your server
- Access web panel at
http://your-server:8080
Note: Core functionality works without the web panel addon. Install the addon only if you want the web management interface.
🗃️ Requirements
- Java 17+
- Minecraft 1.16.5+ (Paper/Spigot recommended)
- Optional: LiteBans or EssentialsX for enhanced ban/mute functionality
📊 API Usage
// Get the API instance
AutoPunishAPI api = AutoPunish.getAPI();
// Punish a player
UUID playerUuid = getPlayerUUID();
api.punishPlayer(playerUuid, "spam", "StaffMember", staffUuid);
// Check player history
PlayerHistory history = api.getPlayerHistory(playerUuid);
// Get severity score
int severity = api.getSeverityScore(playerUuid);
🛡️ Security
- Permission-Based Access: All sensitive operations require specific permissions
- Approval Workflows: Critical actions need administrative approval
- Audit Logging: Complete action tracking for accountability
- Data Integrity: Soft deletes prevent accidental data loss
📈 Database Performance
- Connection Pooling: HikariCP for optimal database connections
- Indexing: Strategic indexes for fast queries
- Migration System: Automatic schema updates
- Query Optimization: Efficient batch operations and caching
AutoPunish v2.2 - Production-Ready Minecraft Moderation with Advanced Monitoring
Changelog AutoPunish Plugin Changelog - Version 1.0.0 to 2.0.0 This changelog details the significant features and improvements added to the AutoPunish plugin throughout our development process.
Core Features (Initial Implementation) Automatic Punishment Escalation: Rules with tiered punishments based on offense count. Player History Tracking: Stored in a database (H2/SQLite or MySQL). Discord Webhook Logging: Real-time notifications for issued punishments. In-Game Commands: /punish <player> <rule>: Apply automated punishments. /punishments <player>: View a player's punishment history. /punishreload: Reload plugin configuration. Mute Functionality: Implemented via temporary permissions using LuckPerms. Basic API: Initial methods for accessing player history. Version 1.1: Enhanced Punishment Logic & History Global Severity Scoring: Implemented calculateSeverityScore and determineGlobalTier in PunishmentManager. Punishments now consider a player's overall violation history for escalation. Severity score and tier calculation integrated into punishment logic and webhook messages. New Command: /severity <player> to check a player's calculated severity score and tier. Improved Webhook Formatting: Included offense number, rule-specific history, and overall severity score in Discord notifications. Version 1.2: Admin Approval System Severe Punishment Approval: Punishments exceeding a configurable duration (default 7 days) or permanent bans require admin approval. Configurable Approval Settings: Added approval-system section to config.yml for: enabled: Toggle approval system. require-approval-after: Minimum ban days requiring approval. bypass-approval-permissions: List of permissions to bypass approval. notify-admin-on-auto-approved: Whether to notify admins of auto-approved punishments. In-Game Approval Commands: /punishadmin list: Lists pending punishments. /punishadmin approve <approvalId>: Approves a queued punishment. /punishadmin deny <approvalId>: Denies a queued punishment. Queued Punishment Management: QueuedPunishment model class. PunishmentQueueManager to handle queuing, approval processing, auto-approvals, and notifications. Database persistence for queued punishments (new queued_punishments table). Admin Web Panel (Port 8080): Login system with configurable credentials. Tabs for Pending Approvals, Punishments, Players. API endpoints for listing, approving, and denying queued punishments. Improved error handling and logging for web panel requests. Webhook Notifications: Notifications for queued punishments. Notifications for denied punishments. API Enhancements: New methods in AutoPunishAPI to interact with the queue (getQueuedPunishments, approvePunishment, denyPunishment, needsApproval). Version 1.3: Dynamic Rule Management & Public Directory Dynamic Rule Management (In-Game Commands): New Commands: /rule list: List all configured rules. /rule info <ruleName>: Show details of a specific rule's tiers. /rule create <ruleName>: Create a new, empty rule. /rule delete <ruleName>: Delete an entire rule. /rule addtier <ruleName> <type> <duration>: Add a new tier to a rule. /rule removetier <ruleName> <tierNumber>: Remove a tier from a rule. /rule edittier <ruleName> <tierNumber> <newType> <newDuration>: Edit an existing tier. Config Synchronization: Changes made via commands are saved to config.yml and synchronized with a new rules database table. PunishmentRule Updates: Added addTier, removeTier, modifyTier methods. ConfigManager Updates: Methods to manage rules and tiers in memory, config.yml, and the database. Database Updates: rules table created, with syncRule, deleteRule, syncAllRules methods in DatabaseManager. Separate Public Punishment Directory (Port 8081): New Manager: PublicWebPanelManager to run the public web server. New Web Files: Dedicated HTML, CSS, and JavaScript in src/main/resources/public-web/ for the public directory. Public API Endpoints: /api/punishments: List all punishments (with pagination, sorting). /api/punishments/warns, /api/punishments/mutes, /api/punishments/bans: Filtered lists. /api/punishments/stats: Show summary statistics. Data Access: Public pages pull data directly from the punishments database table. Auto-Refresh: Public directory pages automatically refresh data every minute. Enhanced Developer API: New Events: PunishmentQueuedEvent, PunishmentApprovedEvent, PunishmentDeniedEvent, PlayerHistoryResetEvent. Expanded API Methods: More methods in AutoPunishAPI to interact with the new queue and rule management features. Improved Documentation: Updated API documentation for developers
AutoPunish – Advanced Minecraft Punishment System
AutoPunish is a powerful and configurable punishment management system for Minecraft servers. It automatically handles player infractions with a tiered escalation system, ensuring consistent rule enforcement while keeping detailed records of all violations.
✦ Key Features
Automatic Escalation – Warnings → Mutes → Bans with customizable severity scoring.
Admin Approval System – Require approval for severe punishments, with Discord webhook notifications and optional staff bypass.
Web Management Panel – Mobile-friendly interface to approve/deny punishments, view history, and search players.
Tracking & Analytics – Severity scores, time decay, and detailed database logging (SQLite/MySQL).
Developer API – Event-driven system with methods to integrate punishments into other plugins.
✦ Commands
/punish <player> <rule> – Apply a punishment
/punishments <player> – View history
/severity <player> – Check severity score
/punishadmin <list|approve|deny> – Manage pending punishments
/punishreload – Reload configuration
/resethistory <player> – Reset history
(Full command and permission list is available on the GitHub page.)
✦ Installation
Download the latest release .jar.
Place it in your server’s /plugins folder.
Restart the server.
Configure config.yml to your needs.
Use /punishreload to apply changes without restarting.
✦ Requirements
Paper/Spigot 1.21+



