ProxyBanSystem

插件

· 作者 Julian1657

适用于 Paper、Spigot、Bukkit、Folia、BungeeCord、Velocity 等的封禁系统!

1 本站下载 0 关注 更新于 4 个月前

最新 ProxyBanSystem · 26.2 · Bukkit / BungeeCord

一键开服(送7天)

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 补全
  • 所有支持平台共享核心逻辑

安装

  1. 构建项目:
mvn clean package
  1. 将 target/proxybansystem-4.4.jar 放入正确的插件文件夹:
  • Velocity:代理 plugins 文件夹
  • BungeeCord/Waterfall:代理 plugins 文件夹
  • Spigot/Paper/Purpur/Folia/Leaf/Bukkit 兼容分支:服务器 plugins 文件夹
  • Sponge:Sponge plugins 文件夹
  1. 启动服务器或代理一次以生成配置文件。

  2. 打开 config.yml 并输入你的 MySQL 连接信息。

  3. 重启服务器/代理或运行 /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"

可用的内置值:

  • en 表示英语
  • de 表示德语

英语为默认语言。语言预设存储在 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:

  • 15m
  • 2h
  • 7d
  • permanent

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

0.0
暂无评分
5 星
0
4 星
0
3 星
0
2 星
0
1 星
0
我的评分

登录后参与评分

还没有评论,来抢沙发吧

评论配图

相似资源