RapidBan
企业级 Minecraft 惩罚管理系统
适用于 Paper 1.21+ 的高性能分布式惩罚管理插件。
核心功能
? 高性能架构
- 异步数据库操作 - 使用 HikariCP 连接池;
所有 I/O 操作均异步执行
- 线程安全设计 - 专用线程池处理数据库请求,不影响服务器 TPS
- 本地缓存 - 活跃封禁缓存以减少数据库查询
? 分布式同步
- 多服务器支持 - 多台服务器共享同一数据库
- 实时同步 - 封禁/解封操作在所有服务器上即时生效
- Redis 支持 - 可选 Redis Pub/Sub 或数据库轮询
? 基于 UUID 的封禁系统
- 基于 UUID 而非玩家名称
- 支持永久封禁、临时封禁和静默封禁
- 到期自动解封
- 完整的撤销系统
? IP 关联检测
- 记录玩家的历史登录 IP
- 自动检测关联(小号)账号
- 通知管理员可疑登录
- 可选自动封禁关联账号
? 自定义踢出界面
- 支持 MiniMessage 格式
- 变量占位符(玩家名称、原因、剩余时间等)
- 针对不同惩罚类型的不同模板
? Web 管理面板
- REST API 接口
- JWT 认证
- 查看惩罚历史
- 执行封禁/解封操作
- 搜索玩家及关联账号
数据库选项
SQLite(推荐用于单服务器)
- ✅ 无需额外安装数据库
- ✅ 配置简单,开箱即用
- ✅ 适合小型服务器
- ❌ 不支持多服务器同步
配置示例:
database:
type: "SQLITE"
sqlite:
file: "rapidban.db"
MySQL/MariaDB(推荐用于多服务器)
- ✅ 支持分布式多服务器同步
- ✅ 高性能,适合大型网络
- ✅ 集中式数据管理
- ❌ 需要单独的数据库服务器
配置示例:
database:
type: "MYSQL"
mysql:
host: "localhost"
port: 3306
database: "rapidban"
username: "root"
password: "password"
配置
config.yml
# 服务器标识符(用于分布式同步)
server-id: "server-1"
# 数据库配置
database:
# 数据库类型:MYSQL 或 SQLITE
type: "MYSQL"
# MySQL/MariaDB 配置
mysql:
host: "localhost"
port: 3306
database: "rapidban"
username: "root"
password: "password"
# SQLite 配置(文件路径相对于插件数据文件夹)
sqlite:
file: "rapidban.db"
# 同步系统配置
sync:
interval-seconds: 5
use-redis: false
redis:
host: "localhost"
port: 6379
password: ""
# IP 关联检测
ip-check:
enabled: true
auto-ban-alts: false
notify-staff: true
# Web 管理面板
web:
enabled: true
host: "0.0.0.0"
port: 8080
jwt-secret: "change-this-to-a-random-secret-key"
admin-username: "admin"
admin-password: "admin123"
命令
命令 描述 权限
/ban <player> <reason> [-t <duration>] [-s] 封禁玩家 rapidban.ban
/unban <player> 解封玩家 rapidban.unban
/history <player> 查看惩罚历史 rapidban.history
/punishundo <player> [reason] 撤销所有惩罚 rapidban.undo
时长格式
- s - 秒
- m - 分钟
- h - 小时
- d - 天
- w - 周
- M - 月
- y - 年
示例:
/ban Player123 Cheating -t 7d
/ban Player456 Abusive language -t 3h -s
/ban Hacker999 Using hacks
权限
权限 描述
rapidban.* 所有权限
rapidban.ban 封禁玩家
rapidban.unban 解封玩家
rapidban.history 查看历史
rapidban.undo 撤销惩罚
rapidban.notify 接收惩罚通知
rapidban.notify.alt 接收关联账号通知
Web API
认证
POST /auth/login
Content-Type: application/json
{
"username": "admin",
"password": "admin123"
}
响应:
{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"username": "admin",
"role": "ADMIN"
}
性能优化
- ✅ 所有数据库操作异步执行
- ✅ HikariCP 连接池优化
- ✅ 活跃封禁本地缓存
- ✅ 专用 I/O 处理线程池
- ✅ 批量查询优化
- ✅ 过期数据自动清理
开发
# 克隆项目
git clone <repository>
# 构建
./gradlew shadowJar
# 输出位置
build/libs/RapidBan-1.0-Beta1.jar
许可证
本项目遵循 GNU General Public License v3.0 许可。
支持
如有任何问题或建议,请提交 Issue。
RapidBan
Enterprise-Grade Minecraft Punishment Management System
A high-performance, distributed punishment management plugin for Paper 1.21+.
Core Features
? High-Performance Architecture
- Asynchronous Database Operations - Uses HikariCP connection pool;
all I/O operations are executed asynchronously
- Thread-Safe Design - Dedicated thread pool for handling database
requests without impacting server TPS
- Local Cache - Active ban cache to reduce database queries
? Distributed Synchronization
- Multi-Server Support - Multiple servers share the same database
- Real-Time Sync - Ban/unban operations take effect instantly across
all servers
- Redis Support - Optional Redis Pub/Sub or database polling
? UUID-Based Ban System
- Based on UUID instead of player name
- Supports permanent bans, temporary bans, and silent bans
- Automatic unban upon expiration
- Complete undo system
? IP Association Detection
- Records players’ historical login IPs
- Automatically detects linked (alt) accounts
- Notifies administrators of suspicious logins
- Optional automatic linked-account banning
? Custom Kick Interface
- Supports MiniMessage format
- Variable placeholders (player name, reason, remaining time, etc.)
- Different templates for different punishment types
? Web Management Panel
- REST API interface
- JWT authentication
- View punishment history
- Execute ban/unban operations
- Search players and linked accounts
Database Options
SQLite (Recommended for Single Server)
- ✅ No additional database installation required
- ✅ Simple configuration, ready to use out of the box
- ✅ Suitable for small servers
- ❌ Does not support multi-server synchronization
Configuration example:
database:
type: "SQLITE"
sqlite:
file: "rapidban.db"
MySQL/MariaDB (Recommended for Multi-Server)
- ✅ Supports distributed multi-server synchronization
- ✅ High performance, suitable for large networks
- ✅ Centralized data management
- ❌ Requires a separate database server
Configuration example:
database:
type: "MYSQL"
mysql:
host: "localhost"
port: 3306
database: "rapidban"
username: "root"
password: "password"
Configuration
config.yml
# Server identifier (used for distributed synchronization)
server-id: "server-1"
# Database configuration
database:
# Database type: MYSQL or SQLITE
type: "MYSQL"
# MySQL/MariaDB configuration
mysql:
host: "localhost"
port: 3306
database: "rapidban"
username: "root"
password: "password"
# SQLite configuration (file path relative to plugin data folder)
sqlite:
file: "rapidban.db"
# Synchronization system configuration
sync:
interval-seconds: 5
use-redis: false
redis:
host: "localhost"
port: 6379
password: ""
# IP association detection
ip-check:
enabled: true
auto-ban-alts: false
notify-staff: true
# Web management panel
web:
enabled: true
host: "0.0.0.0"
port: 8080
jwt-secret: "change-this-to-a-random-secret-key"
admin-username: "admin"
admin-password: "admin123"
Commands
Command Description Permission
/ban <player> <reason> [-t <duration>] [-s] Ban a player rapidban.ban
/unban <player> Unban a player rapidban.unban
/history <player> View punishment history rapidban.history
/punishundo <player> [reason] Undo all punishments rapidban.undo
Duration Format
- s - Seconds
- m - Minutes
- h - Hours
- d - Days
- w - Weeks
- M - Months
- y - Years
Examples:
/ban Player123 Cheating -t 7d
/ban Player456 Abusive language -t 3h -s
/ban Hacker999 Using hacks
Permissions
Permission Description
rapidban.* All permissions
rapidban.ban Ban players
rapidban.unban Unban players
rapidban.history View history
rapidban.undo Undo punishments
rapidban.notify Receive punishment notifications
rapidban.notify.alt Receive linked-account notifications
Web API
Authentication
POST /auth/login
Content-Type: application/json
{
"username": "admin",
"password": "admin123"
}
Response:
{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"username": "admin",
"role": "ADMIN"
}
Performance Optimization
- ✅ All database operations executed asynchronously
- ✅ HikariCP connection pool optimization
- ✅ Active ban local cache
- ✅ Dedicated thread pool for I/O processing
- ✅ Batch query optimization
- ✅ Automatic cleanup of expired data
Development
# Clone the project
git clone <repository>
# Build
./gradlew shadowJar
# Output location
build/libs/RapidBan-1.0-Beta1.jar
License
This project is licensed under the GNU General Public License v3.0.
Support
If you have any questions or suggestions, please submit an Issue.
评论 0
登录后参与评分
还没有评论,来抢沙发吧