ProxyBanSystem
适用于 Minecraft 服务器和网络的跨平台 MySQL 封禁与处罚系统。
ProxyBanSystem 是一款面向 Minecraft 网络的跨平台封禁与处罚插件。同一个编译后的 JAR 文件可在代理平台和服务器平台上运行,所有活跃的封禁记录、查询数据以及已注册的玩家名称均存储在一个共享的 MySQL 数据库中。
仅需 PacketEvents 以消除控制台错误!
PacketEvents
兼容性
一个 JAR 文件设计用于在以下平台运行:
- Velocity
- BungeeCord
- Waterfall
- Spigot
- Paper
- Purpur
- Folia
- Leaf
- Sponge
Waterfall 使用 BungeeCord 加载器。Spigot、Paper、Purpur、Folia、Leaf 以及兼容 Bukkit 的分支版本使用 Bukkit/Spigot 加载器。Folia 的支持通过在 plugin.yml 中标记 folia-supported: true 来实现。
支持的 Minecraft 版本
对于非代理的基于 Bukkit 的服务器,该插件构建为一个跨版本的共享 JAR:
- Minecraft Java
1.20.x
- Minecraft Java
1.21.x
- Minecraft Java
26.1.x
Bukkit 加载器声明了 api-version: '1.20',且项目基于 Spigot API 1.20.1-R0.1-SNAPSHOT 进行编译。这使得 Bukkit 侧的 API 基线保持较低水平,同时允许较新的兼容 Bukkit 的平台(如 Paper、Purpur、Folia 和 Leaf)加载相同的 JAR 文件。
Sponge 支持通过 SpongeAPI 14.0.0 提供;请使用与该 API 版本相匹配的 Sponge 服务器版本。
功能
- 按名称或 UUID 封禁玩家
- 按名称或 UUID 解封玩家
- 被封禁玩家自动登录检测
- 在线玩家被加入封禁名单时自动踢出
- 临时封禁与永久封禁
- 完全可配置的封禁理由及自定义持续时间
- 未知/自定义理由的回退封禁理由
- 通过
messages.yml 自定义封禁界面
- 可自定义插件消息与格式
- 内置语言切换,默认英语,可选德语预设
- 向工作人员广播封禁与解封信息
- 查询系统:支持查看封禁状态、UUID、封禁次数、解封次数、理由、执行者及历史记录
- 从玩家的查询历史中移除单个封禁理由
- 移除玩家的全部查询历史
- 列出所有活跃封禁
- 将玩家加入白名单以防止其被封禁
- 用于离线查询和 Tab 补全的 MySQL 玩家注册表
- 本地
bannedplayers.json 用于存储额外的历史/显示数据
- 配置和消息的重载命令
- 支持玩家、封禁理由和管理子命令的 Tab 补全
- 所有支持平台共享核心逻辑
安装
- 构建项目:
mvn clean package
- 将
target/proxybansystem-4.4.jar 放入正确的插件文件夹:
- Velocity:代理
plugins 文件夹
- BungeeCord/Waterfall:代理
plugins 文件夹
- Spigot/Paper/Purpur/Folia/Leaf/Bukkit 兼容分支:服务器
plugins 文件夹
- Sponge:Sponge
plugins 文件夹
-
启动服务器或代理一次以生成配置文件。
-
打开 config.yml 并输入你的 MySQL 连接信息。
-
重启服务器/代理或运行 /adminpunish reload。
要求
- Java 17 或更高版本的字节码支持
- Maven 用于从源码构建
- MySQL 数据库
- 运行于受支持平台的服务器或代理
请使用你的服务器软件所需的 Java 运行时环境。该插件本身针对 Java 17 字节码编译,因此它也可以在仍运行于 Java 17 的旧版 1.20.x 服务器线上加载,而新版服务器则可以在其更新的 Java 运行时上运行它。Minecraft Java 26.1.x 服务器需要 Java 25;由于 Java 运行时向后兼容 Java 17 字节码,该插件也可在该更新版本的运行时上运行。
当连接正常时,插件会自动创建以下 MySQL 表:
bans
punishment_history
player_registry
文件
config.yml
包含技术设置:
- 前缀与封禁标题
- 封禁/解封广播前缀
- MySQL 主机、端口、数据库、用户、密码及 JDBC 参数
默认生成的前缀使用 » 分隔符,并以 UTF-8 编码书写:
settings:
prefix: "&8[&c&lBANSYSTEM&r&8] &8» "
ban-broadcast-prefix: "&c&lBAN &8» "
unban-broadcast-prefix: "&a&lUNBAN &8» "
如果旧版生成的配置文件对这些默认前缀仍使用之前的 > 分隔符,插件会在运行时将其规范化为 » 样式。
messages.yml
包含所有面向用户和游戏内的设置:
- 活动语言选择
- 命令名称
- 子命令名称
- 消息内容
- 查询格式
- 封禁界面格式
- 广播格式
- 持续时间标签
- 封禁理由
- 白名单
语言在 messages.yml 顶部进行选择:
settings:
language: "en"
可用的内置值:
英语为默认语言。语言预设存储在 languages: 部分下,因此服务器所有者可以在一个文件中编辑英语和德语文本。
bannedplayers.json
在插件数据文件夹中存储额外的本地封禁历史/显示数据。活跃封禁记录仍存储在 MySQL 中。
命令
命令名称可在 messages.yml 中更改。以下是默认命令:
| 命令 |
用法 |
描述 |
/punish <player/uuid> <reason> |
Ban a player |
Uses a configured ban reason or the fallback reason |
/unpunish <player/uuid> |
Unban a player |
Removes the active ban from MySQL |
/lookup <player/uuid> |
Show ban information |
Shows status, counts, reasons, executors, unbans, and dates |
/lookupremove <player/uuid> |
List stored ban reasons |
Shows numbered reasons that can be removed |
/lookupremove <player/uuid> <number/reason> |
Remove one stored ban reason |
Updates history and the active reason if needed |
/lookupfullremove <player/uuid> |
Delete full lookup history |
Removes all punishment history entries for the player |
/punishment listallbans |
List active bans |
Shows all currently banned players from MySQL |
/punishment reload |
Reload config |
Reloads config.yml and messages.yml |
/punishment whitelist add <player> |
Add whitelist entry |
The player can no longer be banned |
/punishment whitelist remove <player> |
Remove whitelist entry |
The player can be banned again |
/adminpunish help |
Show help |
Shows the admin help from messages.yml |
/adminpunish reload |
Reload config |
Reloads config.yml and messages.yml |
Permissions
| Permission |
Description |
punishsystem.admin.use |
Allows use of admin, ban, unban, lookup, and management commands |
punishsystem.admin.seebans |
Receives ban and unban broadcasts |
The console can run management commands without player permissions.
Ban Reasons And Durations
Ban reasons are configured in messages.yml under ban-reasons:
ban-reasons:
hacking:
display: "&cHacking"
duration: "7d"
hausverbot:
display: "&4HAUSVERBOT"
duration: "permanent"
Supported duration values:
ms for milliseconds
s for seconds
m for minutes
h for hours
d for days
permanent, perm, dauerhaft, or -1 for permanent bans
Examples:
If a reason does not exist in ban-reasons, default-ban-reason is used.
Whitelist
Whitelisted players cannot be banned. Entries can be names or UUIDs.
In messages.yml:
whitelist:
- Julian1657
With commands:
/punishment whitelist add <player>
/punishment whitelist remove <player>
Platform Notes
- On Velocity, BungeeCord, and Waterfall, the plugin runs as a proxy plugin.
- On Spigot, Paper, Purpur, Folia, Leaf, and Bukkit-compatible forks, the plugin runs as a server plugin.
- For Bukkit-based non-proxy servers, the supported Minecraft target lines are
1.20.x, 1.21.x, and 26.1.x.
- On Sponge, the plugin runs as a Sponge plugin with Sponge metadata.
- For network-wide bans, use the same MySQL database on all instances.
- If the plugin runs on multiple servers/proxies at the same time, all instances read and write the same MySQL bans.
Build
mvn clean package
Output:
target/proxybansystem-4.3.jar
The JAR contains loader files for all supported platforms:
velocity-plugin.json
bungee.yml
plugin.yml
META-INF/sponge_plugins.json
ProxyBanSystem
Cross-platform MySQL ban and punishment system for Minecraft servers and networks.
ProxyBanSystem is a cross-platform ban and punishment plugin for Minecraft networks. The same built JAR can run on proxy platforms and server platforms, while all active bans, lookup data, and registered player names are stored in one shared MySQL database.
PacketEvents only for Console Errors needed!
PacketEvents
Compatibility
One JAR is designed to run on:
- Velocity
- BungeeCord
- Waterfall
- Spigot
- Paper
- Purpur
- Folia
- Leaf
- Sponge
Waterfall uses the BungeeCord loader. Spigot, Paper, Purpur, Folia, Leaf, and Bukkit-compatible forks use the Bukkit/Spigot loader. Folia support is marked with folia-supported: true in plugin.yml.
Supported Minecraft Versions
For non-proxy Bukkit-based servers, the plugin is built for one shared JAR across:
- Minecraft Java
1.20.x
- Minecraft Java
1.21.x
- Minecraft Java
26.1.x
The Bukkit loader declares api-version: '1.20' and the project compiles against Spigot API 1.20.1-R0.1-SNAPSHOT. This keeps the Bukkit-side API baseline low while still allowing newer Bukkit-compatible platforms such as Paper, Purpur, Folia, and Leaf to load the same JAR.
Sponge support is provided through SpongeAPI 14.0.0; use a Sponge server version that matches that API line.
Features
- Ban players by name or UUID
- Unban players by name or UUID
- Automatic login check for banned players
- Automatic kick when an online player gets banned
- Temporary and permanent bans
- Fully configurable ban reasons with custom durations
- Fallback ban reason for unknown/custom reasons
- Customizable ban screen through
messages.yml
- Customizable plugin messages and formats
- Built-in language switch with English as the default and German as an optional preset
- Ban and unban broadcasts for staff members
- Lookup system for ban status, UUID, ban count, unban count, reasons, executors, and history
- Remove single ban reasons from a player's lookup history
- Remove the full lookup history of a player
- List all active bans
- Whitelist players so they cannot be banned
- MySQL player registry for offline lookups and tab completion
- Local
bannedplayers.json for additional stored history/display data
- Reload commands for config and messages
- Tab completion for players, ban reasons, and admin subcommands
- Shared core logic for all supported platforms
Installation
- Build the project:
mvn clean package
- Put
target/proxybansystem-4.4.jar into the correct plugin folder:
- Velocity: proxy
plugins folder
- BungeeCord/Waterfall: proxy
plugins folder
- Spigot/Paper/Purpur/Folia/Leaf/Bukkit-compatible forks: server
plugins folder
- Sponge: Sponge
plugins folder
-
Start the server or proxy once to generate the files.
-
Open config.yml and enter your MySQL connection data.
-
Restart the server/proxy or run /adminpunish reload.
Requirements
- Java 17 or newer bytecode support
- Maven for building from source
- MySQL database
- A server or proxy running one of the supported platforms
Use the Java runtime required by your server software. The plugin itself is compiled for Java 17 bytecode so it can also load on older 1.20.x server lines that still run on Java 17, while newer server versions can run it on their newer Java runtime. Minecraft Java 26.1.x servers require Java 25; the plugin can run on that newer runtime because Java runtimes are backward-compatible with Java 17 bytecode.
The plugin automatically creates these MySQL tables when the connection works:
bans
punishment_history
player_registry
Files
config.yml
Contains technical settings:
- Prefix and ban title
- Ban/unban broadcast prefixes
- MySQL host, port, database, user, password, and JDBC parameters
Default generated prefixes use the » separator and are written as UTF-8:
settings:
prefix: "&8[&c&lBANSYSTEM&r&8] &8» "
ban-broadcast-prefix: "&c&lBAN &8» "
unban-broadcast-prefix: "&a&lUNBAN &8» "
If an older generated config still uses the previous > separator for these exact default prefixes, the plugin normalizes it back to the » style at runtime.
messages.yml
Contains all user-facing and gameplay settings:
- Active language selection
- Command names
- Subcommand names
- Messages
- Lookup formats
- Ban screen format
- Broadcast formats
- Duration labels
- Ban reasons
- Whitelist
Language is selected at the top of messages.yml:
settings:
language: "en"
Available built-in values:
en for English
de for German
English is the default. The language presets are stored under the languages: section, so server owners can edit both English and German text in one file.
bannedplayers.json
Stores additional local ban history/display data in the plugin data folder. Active bans are still stored in MySQL.
Commands
Command names can be changed in messages.yml. These are the default commands:
| Command |
Usage |
Description |
/punish <player/uuid> <reason> |
Ban a player |
Uses a configured ban reason or the fallback reason |
/unpunish <player/uuid> |
Unban a player |
Removes the active ban from MySQL |
/lookup <player/uuid> |
Show ban information |
Shows status, counts, reasons, executors, unbans, and dates |
/lookupremove <player/uuid> |
List stored ban reasons |
Shows numbered reasons that can be removed |
/lookupremove <player/uuid> <number/reason> |
Remove one stored ban reason |
Updates history and the active reason if needed |
/lookupfullremove <player/uuid> |
Delete full lookup history |
Removes all punishment history entries for the player |
/punishment listallbans |
List active bans |
Shows all currently banned players from MySQL |
/punishment reload |
Reload config |
Reloads config.yml and messages.yml |
/punishment whitelist add <player> |
Add whitelist entry |
The player can no longer be banned |
/punishment whitelist remove <player> |
Remove whitelist entry |
The player can be banned again |
/adminpunish help |
Show help |
Shows the admin help from messages.yml |
/adminpunish reload |
Reload config |
Reloads config.yml and messages.yml |
Permissions
| Permission |
Description |
punishsystem.admin.use |
Allows use of admin, ban, unban, lookup, and management commands |
punishsystem.admin.seebans |
Receives ban and unban broadcasts |
The console can run management commands without player permissions.
Ban Reasons And Durations
Ban reasons are configured in messages.yml under ban-reasons:
ban-reasons:
hacking:
display: "&cHacking"
duration: "7d"
hausverbot:
display: "&4HAUSVERBOT"
duration: "permanent"
Supported duration values:
ms for milliseconds
s for seconds
m for minutes
h for hours
d for days
permanent, perm, dauerhaft, or -1 for permanent bans
Examples:
If a reason does not exist in ban-reasons, default-ban-reason is used.
Whitelist
Whitelisted players cannot be banned. Entries can be names or UUIDs.
In messages.yml:
whitelist:
- Julian1657
With commands:
/punishment whitelist add <player>
/punishment whitelist remove <player>
Platform Notes
- On Velocity, BungeeCord, and Waterfall, the plugin runs as a proxy plugin.
- On Spigot, Paper, Purpur, Folia, Leaf, and Bukkit-compatible forks, the plugin runs as a server plugin.
- For Bukkit-based non-proxy servers, the supported Minecraft target lines are
1.20.x, 1.21.x, and 26.1.x.
- On Sponge, the plugin runs as a Sponge plugin with Sponge metadata.
- For network-wide bans, use the same MySQL database on all instances.
- If the plugin runs on multiple servers/proxies at the same time, all instances read and write the same MySQL bans.
Build
mvn clean package
Output:
target/proxybansystem-4.3.jar
The JAR contains loader files for all supported platforms:
velocity-plugin.json
bungee.yml
plugin.yml
META-INF/sponge_plugins.json
评论 0
登录后参与评分
还没有评论,来抢沙发吧