
Velocity-Report
A lightweight Velocity proxy plugin for cross-server reporting. Server-side only, no sub-server setup needed.Fully supports both Simplified 支持Velocity代理端跨服举报,插件仅需代理服务器安装,子服无需安装。支持管理员/reportcd打开举报记录,可以标记玩家举报为已处理,支持SQLite、MySQL数据库,2.0.9版本已经支持English、简体中文等语言。
Links
Tags
Creators
Details
2.1.0
Compatibility
Changes
VelocityReport v2.1.0 更新说明
- 清理了一部分无用的代码,文件体积大幅度减少。
主要更新
1. MySQL 连接优化 — HikariCP 连接池
问题: 旧版使用单条 JDBC 长连接,MySQL wait_timeout(默认 8 小时)超时后连接断裂,导致 Broken pipe 报错,插件无法继续使用。
解决: 引入 HikariCP 连接池,自动管理连接生命周期。
| 配置项 | 值 | 说明 |
|---|---|---|
| 最大连接数 | 10 | 足够 Velocity 代理使用 |
| 最小空闲 | 3 | 保持基本连接池 |
| 连接超时 | 5 秒 | 获取连接等待时间 |
| 空闲超时 | 10 分钟 | 回收空闲连接 |
| 最大寿命 | 30 分钟 | 远低于 MySQL 8h 的 wait_timeout |
| 保活检测 | 5 分钟 | 定期探测空闲连接 |
2. 语言文件重构
语言文件统一放在 lang/ 文件夹下,首次启动自动生成到插件目录。
plugins/velocity-report/
├── config.yml
└── lang/
├── zh_CN.yml ← 简体中文
└── en_US.yml ← English
配置语言: 修改 config.yml 中的 language 项:
language: zh_CN # 简体中文
language: en_US # English
3. 举报原因 & 服务器别名多语言化
举报原因的显示名称和描述、服务器别名现在跟随语言设置自动切换。
中文效果:
举报原因:外挂作弊、违规言论、熊孩子
服务器:登录服、生存服、小游戏
英文效果:
Reasons: Hacking, Chat Violation, Griefing
Servers: Lobby, Survival, Minigame
4. 体积优化
SQLite JDBC 原生库从 23 个平台精简到常见的 5 个,JAR 体积从 17MB → ~5MB。
保留的平台:
- Linux x86_64(主流服务器)
- Linux aarch64(ARM 云服务器)
- Windows x86_64
- Mac x86_64 / aarch64(开发测试)
配置文件指南
举报原因配置
config.yml 只定义 id 和 icon,显示文本在语言文件中:
report-reasons:
- id: "hacking"
icon: "⛏"
- id: "other"
icon: "📋"
语言文件 (lang/zh_CN.yml):
reason-hacking: "&c外挂作弊"
reason-hacking-desc: "KillAura, ESP, AutoClicker 等作弊行为"
服务器别名配置
config.yml 只列出需要别名的服务器名:
server-aliases:
- lobby
- survival
- minigame
语言文件 (lang/zh_CN.yml):
server-alias-lobby: "&e登录服"
server-alias-survival: "&a生存服"
升级注意事项
- 旧版
lang_zh.yml/lang_en.yml不再使用,如有自定义内容请迁移到lang/zh_CN.yml/lang/en_US.yml - MySQL 用户无需额外配置,连接池自动生效
- SQLite 用户不受影响
Projects on Modrinth are automatically available through a Maven repository for use with JVM build tools such as Gradle. To learn more about the Modrinth Maven API, click here.
Note: When available, you should use the creator's maven repo instead as it will have transitive dependency information that the Modrinth Maven API does not. You may also end up with duplicate dependencies if you use a mix of Modrinth and non-Modrinth Maven repositories for your dependencies, because the group identifier will be different when served through the Modrinth Maven API.
Maven coordinates:
Version ID:
build.gradle:
repositories {
exclusiveContent {
forRepository {
maven {
name = "Modrinth"
url = "https://api.modrinth.com/maven"
}
}
// forRepositories(fg.repository) // Uncomment when using ForgeGradle
filter {
includeGroup "maven.modrinth"
}
}
}
// Standard Gradle dependency
dependencies {
implementation "maven.modrinth:9luTS6QY:OBDyTGvB"
}
// Legacy Loom dependency
dependencies {
modImplementation "maven.modrinth:9luTS6QY:OBDyTGvB"
}
