AntiRedstoneLag
AntiRedstoneLag 可阻止 Paper、Purpur 和 Folia 服务器上的失控红石时钟和 0 刻活塞循环,同时不会破坏玩家的农场。
完整文档位于 synkfr.github.io/AntiRedstoneLag。
功能介绍
当区块内的红石更新超过配置的限制时,插件可以暂时冻结时钟、发送警报(不阻塞任何东西)、取消信号或移除方块。
- 默认非破坏性 (
FREEZE):暂停快速时钟 15 秒,并取消失控信号,而不会破坏红石粉或活塞。 - 仅通知模式 (
/arl redstone notify):让所有农场不受干扰地运行,并在电路激增时向工作人员发送坐标、更新计数和玩家名称。 - 即时开关 (
/arl redstone off和/arl redstone on):从游戏内或控制台开启或关闭红石限制,并立即清除任何活动的冻结或区块锁定。 - TPS 延迟原因查找:当 Paper 服务器上的 TPS 低于
adaptive.min-tps或 MSPT 超过adaptive.target-mspt时,插件会找出最繁忙的红石区块,并通知工作人员是谁在运行它。 - 实时检查器和快照:使用
/arl inspect实时检查区块更新率,使用/arl snapshot检查最近的触发记录,或使用/arl hotspots分组查看繁忙区域。 - ClearLagg 实体清理器:按定时器移除掉落的物品和配置的实体,同时保护有名字、已驯服、拴绳、骑乘以及 SMP 模式的生物。
安装
- 从 Modrinth 或 GitHub Releases 下载 jar 文件。
- 将其放入服务器的
plugins/文件夹中。 - 重启服务器以生成
config.yml和messages.yml。
需要在 Paper、Purpur 或 Folia(Minecraft 1.21.4 至 26.3)上运行 Java 21 或更高版本。
命令
| 命令 | 用途 | 权限 |
|---|---|---|
/arl redstone <on|off|notify|status> |
开启、关闭或设为仅通知模式 | antiredstonelag.redstone |
/arl alerts <on|off|status> |
静音或启用工作人员延迟警报 | antiredstonelag.alerts |
/arl inspect [seconds] |
切换实时 BossBar 区块计量表 | antiredstonelag.inspect |
/arl hotspots [page|export] |
显示或导出活跃的红石集群 | antiredstonelag.hotspots |
/arl snapshot [list|view|tp|clear] |
查看或传送至捕获的延迟点 | antiredstonelag.snapshot |
/arl clear [items|all|mobs|projectiles|xp|vehicles|count|cancel|timer] |
清理地面物品和导致延迟的实体 | antiredstonelag.clear |
/arl stats |
显示监控的区块、方块和移除数量 | antiredstonelag.stats |
/arl logs [download] |
显示日志状态和最新日志文件详情 | antiredstonelag.logs |
/arl reload |
重新加载 config.yml 和 messages.yml |
antiredstonelag.reload |
/arl help |
列出可用命令 | antiredstonelag.use |
拥有 antiredstonelag.bypass 权限的玩家在其放置的方块上不受限制。
从源码构建
mvn clean package
阴影 jar 文件将写入 target/AntiRedstoneLag-26.5.jar。
披露信息
- 使用 bStats 指标(插件 ID
27839),可在plugins/bStats/config.yml中切换。 - 启动时检查
https://api.modrinth.com/v2/project/5UOt11Yc/version以获取较新的发布版本。 - 维护和错误修复过程中使用了 AI 编码工具,并由人类审核。
链接
- 文档:synkfr.github.io/AntiRedstoneLag
- Discord:discord.gg/UAgsmk6KEr
- Issues:github.com/synkfr/AntiRedstoneLag/issues
- 许可证:MIT
AntiRedstoneLag
AntiRedstoneLag stops runaway redstone clocks and 0-tick piston loops on Paper, Purpur, and Folia servers without destroying player farms.
Full documentation lives at synkfr.github.io/AntiRedstoneLag.
What it does
When redstone updates in a chunk pass the configured limits, the plugin can freeze the clock temporarily, send alerts without blocking anything, cancel the signal, or remove the block.
- Non-destructive by default (
FREEZE): Pauses fast clocks for 15 seconds and cancels runaway signals without breaking redstone dust or pistons. - Notification-only mode (
/arl redstone notify): Lets every farm run untouched and sends staff the coordinates, update counts, and player name when a circuit spikes. - Instant toggle (
/arl redstone offand/arl redstone on): Turns redstone limiting off or back on from in-game or console and clears any active freezes or chunk locks right away. - TPS lag culprit lookup: When TPS drops below
adaptive.min-tpsor MSPT passesadaptive.target-mspton Paper, the plugin finds the busiest redstone chunk and notifies staff who is running it. - Live inspector and snapshots: Check chunk update rates live with
/arl inspect, inspect recent trips with/arl snapshot, or group busy areas with/arl hotspots. - ClearLagg entity cleaner: Removes dropped items and configured entities on a timer while keeping named, tamed, leashed, mounted, and SMP mobs safe.
Installation
- Download the jar from Modrinth or GitHub Releases.
- Drop it into your server's
plugins/folder. - Restart the server to generate
config.ymlandmessages.yml.
Requires Java 21 or newer on Paper, Purpur, or Folia (Minecraft 1.21.4 through 26.3).
Commands
| Command | Purpose | Permission |
|---|---|---|
/arl redstone <on|off|notify|status> |
Switch protection on, off, or notify-only | antiredstonelag.redstone |
/arl alerts <on|off|status> |
Mute or enable staff lag alerts | antiredstonelag.alerts |
/arl inspect [seconds] |
Toggle the live BossBar chunk meter | antiredstonelag.inspect |
/arl hotspots [page|export] |
Show or export active redstone clusters | antiredstonelag.hotspots |
/arl snapshot [list|view|tp|clear] |
View or teleport to captured lag sites | antiredstonelag.snapshot |
/arl clear [items|all|mobs|projectiles|xp|vehicles|count|cancel|timer] |
Clear ground items and lag entities | antiredstonelag.clear |
/arl stats |
Show monitored chunks, blocks, and removals | antiredstonelag.stats |
/arl logs [download] |
Show log status and latest log file details | antiredstonelag.logs |
/arl reload |
Reload config.yml and messages.yml |
antiredstonelag.reload |
/arl help |
List available commands | antiredstonelag.use |
Players with antiredstonelag.bypass are exempt on blocks they placed.
Building from source
mvn clean package
The shaded jar is written to target/AntiRedstoneLag-26.5.jar.
Disclosures
- Uses bStats metrics (plugin ID
27839), toggleable inplugins/bStats/config.yml. - Checks
https://api.modrinth.com/v2/project/5UOt11Yc/versionon startup for newer release builds. - AI coding tools were used during maintenance and bug fixes under human review.
Links
- Documentation: synkfr.github.io/AntiRedstoneLag
- Discord: discord.gg/UAgsmk6KEr
- Issues: github.com/synkfr/AntiRedstoneLag/issues
- License: MIT
下载 AntiRedstoneLag
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 AntiRedstoneLag
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 AntiRedstoneLag
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 AntiRedstoneLag
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 AntiRedstoneLag
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 AntiRedstoneLag
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 AntiRedstoneLag
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 AntiRedstoneLag
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
版本 26.5
修复
- 移除了会导致
FREEZE(冻结)静默转换为REMOVE(移除)并删除方块的重复枚举ConfigManager.RemovalAction。现在FREEZE(冻结)和DISABLE(禁用)永远不会破坏红石方块。 - 修复了 ClearLagg 过滤器的一个 Bug:在 1.21+ 版本中,当遇到未知或旧版实体名称(如
Minecart_Tnt或Boat)时,会回退到通配符匹配。未知的实体规则现在将不匹配任何内容并记录警告。Boat、Chest_Boat以及旧版矿车别名已解析为 1.21+ 的 Bukkit 类型,默认config.yml规则使用Chest_Minecart、Hopper_Minecart、Tnt_Minecart和Furnace_Minecart。 - 修复了 Folia 线程安全问题:对
Bukkit.getTPS()和Bukkit.getAverageTickTime()进行了保护,将/arl inspect的玩家位置和粒子效果移至player.getScheduler(),在方块的区域线程上收集本地封锁警报接收者,同步每个区块所有者和被禁用的方块映射表,并在BlockBreakEvent中清除损坏的方块。 - 修复了
LogManager.cleanupOldLogs()错误地删除最新日志文件而非最旧文件的问题;在日志功能禁用时初始化logsFolder以防止出现/arl logs的空指针异常 (NPE);增加了每日日志轮转功能,并将文件写入器切换为 UTF-8 编码。 - 修复了
warnedPlayers冷却时间每秒被清空的问题;改为保留freezeViolations24 小时而不是立即过期;按间隔清除sustainedViolations;修剪脉冲历史映射表;尊重freeze.enabled和adaptive.min-tps配置;抑制空白的""消息;并将 Paper 上硬编码的性能统计数值100替换为实际的 TPS 百分比。 - 修复了 Modrinth 发布构建中的语义化版本比较问题,改为按数值部分进行比较;更新了依赖项:
paper-api(1.21.11-R0.1-SNAPSHOT)、bstats-bukkit(3.2.1)、fastutil(8.5.19)、maven-compiler-plugin(3.16.0) 和maven-shade-plugin(3.6.2)。
新增
- 添加了
/arl redstone <on|off|notify|status>命令以及removal-action: NOTIFY选项,以便农场可以不受干扰地运行,同时管理员仍能收到警报,或者干净地关闭保护功能。 - 添加了
/arl alerts <on|off|status>、alerts.notify-on-tps-lag和alerts.only-when-lagging功能,用于在 TPS 或 MSPT 下降期间识别导致红石延迟的玩家和区块。 - 添加了 VitePress 文档和 GitHub Pages 工作流。
版本 26.3
Folia 区域线程安全与性能修复
- Folia 安全的 ClearLagg 引擎 - 解决了在 Folia 上执行自动清理和手动清理命令时出现的
IllegalStateException: Thread failed main thread check: Accessing entity state off owning region's thread(非法状态异常:线程未通过主线程检查:在非所属区域的线程上访问实体状态)错误。 - 区域实体调度 - 动态检查
Bukkit.isOwnedByCurrentRegion(entity),并通过entity.getScheduler().execute(...)将跨区域实体检视(自定义名称、物品、乘客、是否在地面上)及移除操作直接派发至该实体所属的区域刻线程。 - 异步任务追踪 - 添加了原子性任务完成追踪和备用安全超时机制,确保在所有区域线程完成实体处理并广播已清理实体数量时数据的准确性。
- 空间附近玩家查询 - 将邻近节流(
RedstoneListener.hasPlayersNearby)和快照肇事者解析(SnapshotManager.findNearestPlayer)中的全地图玩家遍历替换为 Paper 原生的空间world.getNearbyPlayers(),防止在 Folia 上出现跨区域玩家循环以及在非线程上调用player.getLocation()。 - ClearLagg 并发锁 - 添加了原子性执行守卫(
clearingInProgress),以防止在服务器高负载期间发生重叠的并发清理运行。
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
插件
PacketEvents 是一款专为 Minecraft Java 版打造的协议库,旨在简化数据包的处理与传输。
插件
使床在所有维度中爆炸的模组
插件
ExyliaPlugins 的库。
插件
通过对话框或铁砧界面帮助你的 Anthme
插件
重新定义服务器上的生物运输方式。使用高度可定制的口袋道具,安全地捕获、存储和释放任何实体。
插件
为基于 Spigot/Paper/Folia 的服务器添加对 Vivecraft 的支持
评论 0
登录后参与评分
还没有评论,来抢沙发吧