LeavesAntiIllegal
一款用于基于 Bukkit 的 Minecraft 1.21.10 / 1.21.11 服务器的违禁物品扫描插件,涵盖在线玩家、已加载容器以及离线玩家数据。
!我们仅在 leaves 服务器上进行测试。如果它在其他基于 Bukkit 的服务器上无法正常工作,您可以在 我们的 QQ 群 反馈。
文档:github pages
旧版本可能存在一些错误。请使用最新版本。
LeavesAntiIllegal 3.1.1
LeavesAntiIllegal 是一款基于 Bukkit API 的非法物品扫描器,适用于 Spigot、Paper、Purpur、Leaves 以及其他兼容 Bukkit 的服务器。它需要 Java 17,并支持 Minecraft 1.20 至 26.2。该项目已从 FoliaAntiIllegal 恢复并迁移;不再依赖 Folia 特定的调度 API。
功能
- 在拾取物品、在库存中点击、移动、交换或将物品添加到玩家库存时进行检查。
- 定期扫描在线玩家的库存、末影箱、副手物品、光标物品以及玩家数据。
- 批量扫描已加载的容器方块和容器实体,无需加载新区块。
- 在低负载窗口期间异步扫描
playerdata/<UUID>.dat 中的离线玩家数据。
- 递归检查潜影盒、 bundles 和其他嵌套容器。
- 检测非法材质、附魔过量、异常堆叠、耐久度或属性值以及不可破坏标记。
文档:
安装
- 安装 Java 17 或更高版本,并使用来自 Minecraft 1.20 至 26.2 的兼容 Bukkit API 的服务器。
- 将
LeavesAntiIllegal-3.1.1.jar 放入服务器的 plugins/ 目录中。
- 启动服务器一次,并检查
plugins/LeavesAntiIllegal/config.yml。
- 首次部署时,将
scanners.offline-player-data.dry-run 设置为 true 并观察一个低负载窗口。
- 验证日志输出后,将其设置为
false 并运行 /antiillegal reload。
所有扫描器默认启用。在修改离线玩家数据之前,插件会在同一目录下创建 <UUID>.dat.fai.bak,并通过临时文件替换原始文件。
从 FoliaAntiIllegal 迁移
插件目录从 plugins/FoliaAntiIllegal/ 更改为 plugins/LeavesAntiIllegal/。不要直接用旧的配置文件覆盖新的配置。先生成完整的 3.1.1 config.yml,然后逐项合并旧服务器配置中的非法材质、属性阈值、白名单条目和消息。
升级前请停止服务器并备份所有世界。不要同时加载旧的和新的 JAR 文件。移除旧的 JAR 后,将新版本放入 plugins/ 目录中。/antiillegal 命令、/ai 和 /illegal 别名以及 antiillegal.* 权限节点保持不变。
构建
该项目以 Spigot Bukkit API 兼容性为基线,并基于 Java 17:
mvn clean package
输出文件为:
plugin/target/LeavesAntiIllegal-3.1.1.jar
该插件仅依赖 Bukkit 公共 API。Querz NBT 库已被 shaded(着色/内嵌)并重新定位至 dev.leavesantiillegal.lib.querz,因此服务器无需安装其他依赖。
版本特定的实现代码拆分在 versions/ 目录下:
v1_20_1: Minecraft 1.20.x 适配器
v1_21: Minecraft 1.21.x 适配器
v26_2: Minecraft 26.2.x 适配器
插件在启动时检测 Bukkit 版本并加载匹配的适配器。共享的扫描逻辑不依赖于私有服务端实现。
运行时约束
在线玩家和已加载的容器方块由 Bukkit 主线程分批扫描。离线 .dat 读取、NBT 处理、备份及写入操作均在异步任务中运行。登录/登出保护机制以及针对每个玩家的文件锁可防止扫描器与服务端同时修改同一份玩家数据。
当在线玩家数量超过配置阈值或服务器脱离低负载窗口时,离线扫描会暂停或停止。未完成的扫描绝不会记录为成功。
源代码仅使用 Bukkit/Spigot 公共 API。Paper、Purpur、Leaves 及其他兼容服务端自行提供了这些 API。该插件不会调用 NMS、CraftBukkit 内部类或服务端特定的实现类。
GitLab CI 发布
发行版版本号存储在 version.txt 中,发行说明存储在 Description.txt 中。GitLab CI 执行清理阶段,进行标准的 Maven 构建,将 JAR 发布到 Modrinth,并使用 v<version> 标签创建对应的 GitLab Release。
设置以下受保护且掩码处理的 GitLab CI/CD 变量:
MODRINTH_TOKEN
MODRINTH_PROJECT_ID
Modrinth 发布使用 bukkit 加载器,并声明支持 Minecraft 1.20 至 26.2 版本。
LeavesAntiIllegal 3.1.1
LeavesAntiIllegal 是一个基于 Bukkit API 的违规物品扫描插件,兼容 Spigot、Paper、Purpur、Leaves 以及其他 Bukkit 兼容服务端。插件要求 Java 17,支持 Minecraft 1.20 至 26.2。本项目由 FoliaAntiIllegal 恢复并迁移而来,已经移除对 Folia 专用调度 API 的依赖。
功能特性
- 在拾取物品、点击容器、移动物品、交换手持物品以及物品加入玩家背包时进行检查。
- 定时扫描在线玩家背包、末影箱、副手、光标物品以及玩家数据。
- 分批扫描已经加载的方块容器和容器实体,不会为了扫描主动加载新区块。
- 在低负载时间异步扫描
playerdata/<UUID>.dat 中的离线玩家数据。
- 递归检查潜影盒、收纳袋以及其他嵌套容器。
- 检测违规材料、超限附魔、异常堆叠、耐久或属性异常以及不可破坏标记。
相关文档:
安装
- 安装 Java 17 或更高版本,并使用 Minecraft 1.20 至 26.2 的 Bukkit API 兼容服务端。
- 将
LeavesAntiIllegal-3.1.1.jar 放入服务端的 plugins/ 目录。
- 启动一次服务端,检查
plugins/LeavesAntiIllegal/config.yml。
- 首次部署时,建议将
scanners.offline-player-data.dry-run 设置为 true,观察一个低负载时间窗口。
- 确认日志符合预期后,将其改为
false,并执行 /antiillegal reload。
所有扫描器默认开启。离线玩家数据真正修改前,插件会在原目录创建 <UUID>.dat.fai.bak 备份,并通过临时文件替换原数据。
从 FoliaAntiIllegal 迁移
插件目录由 plugins/FoliaAntiIllegal/ 改为 plugins/LeavesAntiIllegal/。不要直接使用旧配置覆盖新配置。请先生成完整的 3.1.1 config.yml,再逐项合并旧服务端配置中的违规材料、属性阈值、白名单和消息内容。
升级前请停止服务端并备份所有世界。旧 JAR 和新 JAR 不能同时加载。删除旧 JAR 后,再将新版本放入 plugins/ 目录。/antiillegal 命令、/ai 和 /illegal 别名以及 antiillegal.* 权限节点保持不变。
构建
项目使用 Spigot Bukkit API 兼容基线和 Java 17:
mvn clean package
输出文件:
plugin/target/LeavesAntiIllegal-3.1.1.jar
插件只依赖 Bukkit 公共 API。Querz NBT 库会被 shade 并重定位到 dev.leavesantiillegal.lib.querz,服务端不需要额外安装依赖。
不同版本的实现拆分在 versions/ 目录:
v1_20_1:Minecraft 1.20.x 适配器
v1_21:Minecraft 1.21.x 适配器
v26_2:Minecraft 26.2.x 适配器
插件启动时会检测 Bukkit 版本并加载对应适配器。公共扫描逻辑不依赖服务端私有实现。
运行约束
在线玩家和已加载的容器方块由 Bukkit 主线程分批扫描。离线 .dat 读取、NBT 处理、备份和写回都在异步任务中执行。登录/退出保护和每个玩家的数据文件锁会防止扫描器与服务端同时修改同一份玩家数据。
当在线人数超过配置阈值或服务端离开低负载时间窗口时,离线扫描会暂停或停止。未完成的扫描不会被记录为成功。
源代码只使用 Bukkit/Spigot 公共 API。Paper、Purpur、Leaves 以及其他兼容服务端会自行提供这些 API。插件不会调用 NMS、CraftBukkit 内部实现或服务端专用类。
GitLab CI 发布
版本号保存在 version.txt,发布描述保存在 Description.txt。GitLab CI 会先执行 clean 阶段,再执行标准 Maven 构建,将 JAR 发布到 Modrinth,并使用 v<版本号> 标签创建对应的 GitLab Release。
请在 GitLab 项目的 CI/CD Variables 中配置以下受保护且隐藏的变量:
MODRINTH_TOKEN
MODRINTH_PROJECT_ID
Modrinth 发布使用 bukkit loader,并声明 Minecraft 1.20 至 26.2 的版本列表。
LeavesAntiIllegal
A banned items scanning plugin for Bukkit-based Minecraft 1.21.10 / 1.21.11 server, covering online players, loaded containers, and offline player data.
!We only test it on leaves server.If it doesn't work on other Bukkit-based server,you can feedback at our qq group.
Docs:github pages
The old version may have some bug.Please use the latest version.
LeavesAntiIllegal 3.1.1
LeavesAntiIllegal is a Bukkit API based illegal-item scanner for Spigot, Paper, Purpur, Leaves, and other Bukkit-compatible servers. It requires Java 17 and supports Minecraft 1.20 through 26.2. The project was restored and migrated from FoliaAntiIllegal; it no longer depends on Folia-specific scheduling APIs.
Features
- Checks items when they are picked up, clicked in inventories, moved, swapped, or added to a player's inventory.
- Periodically scans online player inventories, ender chests, off-hand items, cursor items, and player data.
- Scans loaded container blocks and container entities in batches without loading new chunks.
- Asynchronously scans offline player data in
playerdata/<UUID>.dat during low-load windows.
- Recursively checks shulker boxes, bundles, and other nested containers.
- Detects illegal materials, excessive enchantments, abnormal stacks, durability or attribute values, and unbreakable markers.
Documentation:
Installation
- Install Java 17 or newer and use a Bukkit API compatible server from Minecraft 1.20 through 26.2.
- Place
LeavesAntiIllegal-3.1.1.jar in the server's plugins/ directory.
- Start the server once and inspect
plugins/LeavesAntiIllegal/config.yml.
- For the first deployment, set
scanners.offline-player-data.dry-run to true and observe one low-load window.
- After verifying the log output, set it to
false and run /antiillegal reload.
All scanners are enabled by default. Before modifying offline player data, the plugin creates <UUID>.dat.fai.bak in the same directory and replaces the original file through a temporary file.
Migration From FoliaAntiIllegal
The plugin directory changes from plugins/FoliaAntiIllegal/ to plugins/LeavesAntiIllegal/. Do not directly overwrite the new configuration with the old one. Generate the complete 3.1.1 config.yml first, then merge illegal materials, attribute thresholds, whitelist entries, and messages from the old server configuration item by item.
Stop the server and back up all worlds before upgrading. Do not load the old and new JAR files together. After removing the old JAR, place the new version in the plugins/ directory. The /antiillegal command, /ai and /illegal aliases, and antiillegal.* permission nodes remain unchanged.
Building
The project uses the Spigot Bukkit API compatibility baseline and Java 17:
mvn clean package
The output file is:
plugin/target/LeavesAntiIllegal-3.1.1.jar
The plugin depends only on the Bukkit public API. The Querz NBT library is shaded and relocated to dev.leavesantiillegal.lib.querz, so servers do not need to install another dependency.
Version-specific implementations are split under versions/:
v1_20_1: Minecraft 1.20.x adapters
v1_21: Minecraft 1.21.x adapters
v26_2: Minecraft 26.2.x adapters
At startup, the plugin detects the Bukkit version and loads the matching adapter. Shared scanning logic does not depend on private server implementations.
Runtime Constraints
Online players and loaded container blocks are scanned in batches from the Bukkit main thread. Offline .dat reads, NBT processing, backups, and writes run in asynchronous tasks. Login/logout protection and per-player file locks prevent the scanner and the server from modifying the same player data simultaneously.
Offline scans pause or stop when the online player count exceeds the configured threshold or the server leaves its low-load window. An incomplete scan is never recorded as successful.
The source code uses only Bukkit/Spigot public APIs. Paper, Purpur, Leaves, and other compatible servers provide those APIs themselves. The plugin does not call NMS, CraftBukkit internals, or server-specific implementation classes.
GitLab CI Publishing
The release version is stored in version.txt, and the release description is stored in Description.txt. GitLab CI runs the clean stage, performs the standard Maven build, publishes the JAR to Modrinth, and creates the matching GitLab Release with the v<version> tag.
Set these protected and masked GitLab CI/CD variables:
MODRINTH_TOKEN
MODRINTH_PROJECT_ID
The Modrinth publication uses the bukkit loader and declares Minecraft versions 1.20 through 26.2.
LeavesAntiIllegal 3.1.1
LeavesAntiIllegal 是一个基于 Bukkit API 的违规物品扫描插件,兼容 Spigot、Paper、Purpur、Leaves 以及其他 Bukkit 兼容服务端。插件要求 Java 17,支持 Minecraft 1.20 至 26.2。本项目由 FoliaAntiIllegal 恢复并迁移而来,已经移除对 Folia 专用调度 API 的依赖。
功能特性
- 在拾取物品、点击容器、移动物品、交换手持物品以及物品加入玩家背包时进行检查。
- 定时扫描在线玩家背包、末影箱、副手、光标物品以及玩家数据。
- 分批扫描已经加载的方块容器和容器实体,不会为了扫描主动加载新区块。
- 在低负载时间异步扫描
playerdata/<UUID>.dat 中的离线玩家数据。
- 递归检查潜影盒、收纳袋以及其他嵌套容器。
- 检测违规材料、超限附魔、异常堆叠、耐久或属性异常以及不可破坏标记。
相关文档:
安装
- 安装 Java 17 或更高版本,并使用 Minecraft 1.20 至 26.2 的 Bukkit API 兼容服务端。
- 将
LeavesAntiIllegal-3.1.1.jar 放入服务端的 plugins/ 目录。
- 启动一次服务端,检查
plugins/LeavesAntiIllegal/config.yml。
- 首次部署时,建议将
scanners.offline-player-data.dry-run 设置为 true,观察一个低负载时间窗口。
- 确认日志符合预期后,将其改为
false,并执行 /antiillegal reload。
所有扫描器默认开启。离线玩家数据真正修改前,插件会在原目录创建 <UUID>.dat.fai.bak 备份,并通过临时文件替换原数据。
从 FoliaAntiIllegal 迁移
插件目录由 plugins/FoliaAntiIllegal/ 改为 plugins/LeavesAntiIllegal/。不要直接使用旧配置覆盖新配置。请先生成完整的 3.1.1 config.yml,再逐项合并旧服务端配置中的违规材料、属性阈值、白名单和消息内容。
升级前请停止服务端并备份所有世界。旧 JAR 和新 JAR 不能同时加载。删除旧 JAR 后,再将新版本放入 plugins/ 目录。/antiillegal 命令、/ai 和 /illegal 别名以及 antiillegal.* 权限节点保持不变。
构建
项目使用 Spigot Bukkit API 兼容基线和 Java 17:
mvn clean package
输出文件:
plugin/target/LeavesAntiIllegal-3.1.1.jar
插件只依赖 Bukkit 公共 API。Querz NBT 库会被 shade 并重定位到 dev.leavesantiillegal.lib.querz,服务端不需要额外安装依赖。
不同版本的实现拆分在 versions/ 目录:
v1_20_1:Minecraft 1.20.x 适配器
v1_21:Minecraft 1.21.x 适配器
v26_2:Minecraft 26.2.x 适配器
插件启动时会检测 Bukkit 版本并加载对应适配器。公共扫描逻辑不依赖服务端私有实现。
运行约束
在线玩家和已加载的容器方块由 Bukkit 主线程分批扫描。离线 .dat 读取、NBT 处理、备份和写回都在异步任务中执行。登录/退出保护和每个玩家的数据文件锁会防止扫描器与服务端同时修改同一份玩家数据。
当在线人数超过配置阈值或服务端离开低负载时间窗口时,离线扫描会暂停或停止。未完成的扫描不会被记录为成功。
源代码只使用 Bukkit/Spigot 公共 API。Paper、Purpur、Leaves 以及其他兼容服务端会自行提供这些 API。插件不会调用 NMS、CraftBukkit 内部实现或服务端专用类。
GitLab CI 发布
版本号保存在 version.txt,发布描述保存在 Description.txt。GitLab CI 会先执行 clean 阶段,再执行标准 Maven 构建,将 JAR 发布到 Modrinth,并使用 v<版本号> 标签创建对应的 GitLab Release。
请在 GitLab 项目的 CI/CD Variables 中配置以下受保护且隐藏的变量:
MODRINTH_TOKEN
MODRINTH_PROJECT_ID
Modrinth 发布使用 bukkit loader,并声明 Minecraft 1.20 至 26.2 的版本列表。
评论 0
登录后参与评分
还没有评论,来抢沙发吧