RegionDispatcher
一个独立的 Folia 插件,用于将进入的玩家分发到多个大厅区域,以利用 Folia 的区域级多线程功能。
当数百名玩家同时出现在 Folia 服务器的同一区域时,只有一个区域线程承担所有工作,而其他 CPU 核心则处于空闲状态。通过将你的大厅拆分为多个相同的建筑副本,并在它们之间分发玩家,RegionDispatcher 让 Folia 能够并行处理负载,即使在高玩家数量下也能保持服务器的响应能力。
该插件没有外部依赖:不需要 WorldGuard、WorldEdit 或其他任何插件。区域由出生点周围的简单半径定义,游戏内命令允许你只需站在想要的位置并输入一条命令即可创建它们。
亮点
- 加入时自动分发,提供三种策略(
LEAST_FILLED、ROUND_ROBIN、RANDOM)
- 使用
/regionspawn add <name> 在游戏内创建区域——无需编辑 YAML 文件
- 内置大厅保护(禁止破坏/放置、掉落物、伤害、PvP、投射物……),可通过权限绕过
- 虚空救援:低于配置 Y 级别的玩家会自动重新分发
- 兼容 Folia:使用实体调度器进行传送,使用
ConcurrentHashMap + AtomicInteger 进行计数
- 零外部依赖
文档
完整的文档、配置参考、命令列表和权限说明可在 GitHub 上的 README 中找到:
➡️ github.com/Lorn87/RegionDispatcher
源代码
github.com/Lorn87/RegionDispatcher
问题 / 错误报告
github.com/Lorn87/RegionDispatcher/issues
RegionDispatcher
A standalone Folia plugin that distributes incoming players across multiple lobby zones to take advantage of Folia's per-region multi-threading.
When several hundred players land in the same area on a Folia server, only one region thread does all the work and the other CPU cores stay idle. By splitting your lobby into several copies of the same build and dispatching players between them, RegionDispatcher lets Folia parallelize the load and keeps the server responsive even with very high player counts.
The plugin has no external dependencies: no WorldGuard, no WorldEdit, nothing. Zones are defined by a simple radius around a spawn point, and an in-game command lets you create them just by standing where you want and typing one command.
Highlights
- Automatic dispatch on join with three strategies (
LEAST_FILLED, ROUND_ROBIN, RANDOM)
- In-game region creation with
/regionspawn add <name> — no YAML editing
- Built-in lobby protection (no break/place, drops, damage, PvP, projectiles…) bypassable with a permission
- Void rescue: players falling below the configured Y level are automatically re-dispatched
- Folia-safe: entity scheduler for teleports,
ConcurrentHashMap + AtomicInteger for counters
- Zero external dependencies
Documentation
Full documentation, configuration reference, command list and permissions are in the README on GitHub:
➡️ github.com/Lorn87/RegionDispatcher
Source code
github.com/Lorn87/RegionDispatcher
Issues / bug reports
github.com/Lorn87/RegionDispatcher/issues
评论 0
登录后参与评分
还没有评论,来抢沙发吧