Vineurodev RLGL
红灯,绿灯 —— 两种玩法,零依赖。
一条命令冻结整个服务器,或者构建完整的竞速竞技场:设有大厅、起跑线、终点线和玩家无法越界的区域。通过点击两个方块来选择它们。让向导告诉你还缺少什么。
无需数据库。无需 Citizens。无需 WorldGuard。无需经济插件。所有内容都是可读的 YAML 文件;如果你配置错误,插件会与你争辩,而不是默默地回退到默认值。
⚠️ 需要 Java 25
Paper 26.2 包含 Java 25 类文件,因此这是硬性要求,而非偏好——Java 21 服务器无法加载它。请在下载前检查你的运行环境。
|
|
| 服务器 |
Paper 26.2+ |
| Java |
25+ |
| 可选 |
PlaceholderAPI 2.11.6+ |
? 两种玩法
全局模式完全无需设置。 一条命令即可将所有在线玩家纳入其中,无论他们站在哪里。在计时结束前存活且不死即为获胜。
/rlgl start global 2m
竞技场模式是完整的竞速赛。 玩家在大厅排队,倒计时结束时一起出生,然后冲向终点线。起跑线防止任何人过早向前移动。游玩区域会将任何走出边界的人传送回内部。观战者边界将淘汰的玩家限制在你希望的位置。
每个竞技场有两种生命模式:CONTINUOUS 允许死者重生并再次尝试,ONE_LIFE 则让他们在本轮剩余时间内直接进入观战状态。
?️ 通过点击方块构建竞技场
无需输入坐标。四种工具,每种对应你需要定义的一项内容:
/rlgl regionstick myarena
右键点击两个方块,左键点击确认,工具随即消失。选错了角落?在确认之前再次右键点击——在你确认之前不会写入任何内容。竞技场名称存储在物品内部,因此两个工具对应两个竞技场时永远不会冲突,且在持有工具期间取消方块交互。
然后让向导驱动流程:
/rlgl wizard myarena
一份实时清单,列出所有要求,每项都有勾选或叉号,以及用于下一步的可点击命令。当你完成步骤时,它会自行刷新。保持窗口打开并按列表逐项完成。
/rlgl arena enable 拒绝未完成的竞技场,因此玩家永远无法加入一个无法完成的赛道。
? 使其成为游戏的规则
两个容易被忽略的细节,但会改变玩法:
- 反应窗口。 灯变红并不会因为你已经 committed(承诺/投入)的动量而杀死你。可配置,默认 1.25 秒。
- 绿灯闲置惩罚。 绿灯亮着时静止不动会损失生命值。如果没有这个惩罚,最优策略就是永远不动,这样回合就会很无聊。将伤害设置为
0,检查将完全停止运行。
灯光持续时间在你设置的上下限之间随机化。如果范围搞反了,系统会在警告中进行修复,而不是在回合中途中止灯光循环。
? 自我检查的配置
每次读取文件时都会验证每个值。任何不可用的值都会被修复为已知默认值,并在控制台中命名显示,以便拼写错误在第一次重启时可见,而不是六周后才被发现:
[VincergyRLGL] 2 problem(s) found in config.yml:
[VincergyRLGL] - 'arena.default-life-mode' has invalid value 'ONELIFE', using CONTINUOUS instead
[VincergyRLGL] - 'global.max-light-delay-seconds' value '1' is out of range, clamped to 2
省略的键使用其默认值,因此精简配置文件是安全的。值只读取一次存入快照,而不是在游戏过程中查找——移动路径上没有任何字符串键映射查找操作。
比赛期间的 /rlgl reload 无法更改正在进行中的回合的规则。
?️ 它不会吞噬你的竞技场
该插件拒绝做两件事:
- 覆盖无法读取的坐标。 如果服务器启动时竞技场的世界未加载——这在管理世界的插件延迟加载世界时很常见——存储的坐标在磁盘上保持不变,直到世界存在时才加载。
/rlgl status 列出哪些竞技场正在等待。保存操作绝不会用“无”覆盖“有”。
- 一条命令删除。
/rlgl arena delete myarena 不会删除任何东西。它会显示将要丢失的内容,如果玩家站在其中则会发出警告,并激活一个有效期为 30 秒的确认机制。确认绑定到确切的竞技场名称和你本人,且仅限单次使用——因此过期的“是”永远不会落在你看到的另一个竞技场之上。
竞技场名称在存入存储之前经过验证,因为名称会成为 YAML 键:否则一个点会使一个竞技场嵌套在另一个之中,并静默损坏文件。
? 统计数据和排行榜
每个玩家的竞技场胜场、完美胜场、全局生存次数和死亡次数。
统计数据采用批量处理并定期刷新,而不是每次击杀都写入整个文件,并且总是在关闭时保存。在比赛中间进行主线程文件 I/O 并不是一项功能。
配合 PlaceholderAPI 使用:
%rlgl_arena_wins% %rlgl_current_arena%
%rlgl_arena_flawless_wins% %rlgl_light%
%rlgl_deaths% %rlgl_remaining_time%
%rlgl_top_arena_wins_name_1% %rlgl_top_arena_wins_value_1%
排行榜排除从未得分的玩家,因此不会填充零,平局按名称排序,以确保请求之间的顺序不会洗牌。
? 无需经济依赖的奖励
控制台命令,在获胜时运行:
arena:
finish:
enabled: true
commands:
- 'give %player% diamond 3'
- 'eco give %player% 500'
命令是保持插件零依赖的逃生舱——eco give %player% 500 适用于你已运行的任何经济插件。分别提供完成奖励、无死亡完成奖励和全局回合生存奖励。每一项默认禁用,因此全新安装时除非你明确启用,否则不会发放任何奖励。
? 模块化
四个可开启或关闭的模块:setup-tools、stats、rewards、placeholders。禁用的模块不会注册任何内容——也不会留下任何空闲监听器。在竞技场搭建完成后,请关闭 setup-tools,这样它的交互处理器就不会再响应每一次方块点击。在测试期间,请关闭 rewards,以免测试运行中发放奖励。
/rlgl modules 可查看当前实际运行的模块。
⚙️ 专为 Paper 26.2 打造
全程使用 Adventure 组件与 Boss 条,基于属性的生命值,通过注册表进行材质查找,使用 PluginMeta 而非已弃用的描述文件。仅支持 Bukkit API——不涉及 NMS,无反射调用,无版本锁定依赖。
代码中未使用任何已弃用的 API,且在启用 -Xlint:all 编译时,构建过程产生 零编译器警告。没有任何抑制项来掩盖问题。
随附 119 个 JUnit 测试,覆盖所有涉及分支逻辑的部分:包括溢出和格式错误输入在内的 120 / 90s / 2m30s 时长语法解析;包含 YAML 路径及遍历情况的竞技场名称验证;包含性方块包围检测;对角线及分段端点处的单向终点线穿越判定;排行榜排序与平局处理;使用播种随机源的光延迟边界检查;以及删除确认令牌的匹配、作用域与过期机制——这些测试均针对注入时钟执行,而非依赖 sleep。
故意不引入服务器模拟框架:值得测试的逻辑位于从不接触 Bukkit 的类中。
? 命令与权限
/rlgl 下包含 16 个子命令,其中 15 个用于竞技场操作,每个子命令都拥有独立的权限节点、用法提示和 Tab 补全功能。/rlgl help 由命令注册表自动生成,仅列出发送者实际可以执行的命令,因此绝不会向用户展示其无权使用的命令。
共 23 个权限节点,每个节点均有描述说明,并归类于 rlgl.admin 和 rlgl.user 之下。每个子命令都会独立检查自身所需的权限节点,因此无需授予父级权限即可单独使用——例如,若你仅需列表功能,可直接授予 rlgl.arena.list。
? 文本
玩家看到的所有字符串均存放在 messages.yml 中——共 124 个键值,每个键值旁都有注释文档说明其占位符。Java 代码中无任何硬编码字符串,因此你可以重写或翻译整个插件而无需修改代码。
插件默认提供英文。 仅有一个消息文件,并非按语言加载的多文件结构:将其复制出来,翻译其中的值,然后重载即可。如果你需要多个语言在运行时切换的功能,本插件目前尚不支持。
须知事项
两个诚实的限制条件,希望你在此处知晓,而不是在购买后才发现:
- 同一时间只能运行一个竞技场。 启动不同的竞技场会停止当前正在运行的竞技场。适用于活动场景;但不适合拥有六个同时进行游戏的大厅服务器。
- 模块变更需要重启服务器。
/rlgl reload 可以重载所有五个 YAML 文件中的其他设置,但启用模块必须注册监听器和命令,因此只能在启动时完成。
插件自带完整文档:包括命令参考、权限参考、逐键配置参考、五项功能指南、常见问题解答(FAQ)以及故障排除指南。
Vineurodev RLGL
Red Light, Green Light — two ways to play, and not a single dependency.
Freeze the entire server with one command, or build proper race arenas with a
lobby, a start line, a finish line and bounds players cannot leave. Select them by
clicking two blocks. Let a wizard tell you what is still missing.
No database. No Citizens. No WorldGuard. No economy plugin. Everything is YAML you
can read, and the plugin argues with you when you get it wrong instead of quietly
falling back to a default.
⚠️ Requires Java 25
Paper 26.2 ships Java 25 class files, so this is a hard floor, not a preference —
a Java 21 server cannot load it. Check your runtime before you download.
|
|
| Server |
Paper 26.2+ |
| Java |
25+ |
| Optional |
PlaceholderAPI 2.11.6+ |
? Two ways to play
Global mode needs no setup at all. One command enrols every online player,
wherever they are standing. Survive to the timer without dying and you win.
/rlgl start global 2m
Arena mode is the full race. Players queue in a lobby, spawn together when the
countdown ends, and run for a finish line. A start line stops anyone creeping
forward early. A play region teleports anyone who wanders out back inside.
Spectator bounds hold the eliminated where you want them.
Two life modes per arena: CONTINUOUS lets the dead respawn and try again,
ONE_LIFE puts them straight into spectator for the rest of the round.
?️ Build an arena by clicking blocks
No coordinates to type. Four tools, one per thing you need to define:
/rlgl regionstick myarena
Right-click two blocks, left-click to confirm, and the tool removes itself. Wrong
corner? Right-click again before confirming — nothing is written until you do.
The arena name lives inside the item, so two tools for two arenas never collide,
and block interaction is cancelled while you hold one.
Then let the wizard drive:
/rlgl wizard myarena
A live checklist of every requirement, ticked or crossed, each with a clickable
command for the next step. It refreshes itself as you finish steps. Leave it open
and work down the list.
/rlgl arena enable refuses an unfinished arena, so players can never join a
course they are unable to complete.
? The rules that make it a game
Two details that are easy to leave out, and change how it plays:
- A reaction window. The light turning red does not kill you for momentum you
had already committed to. Configurable, default 1.25 s.
- A green-light idle penalty. Standing still while the light is green costs
health. Without it, the optimal strategy is to never move at all, and the round
is dull. Set the damage to
0 and the check stops running entirely.
Light durations are randomised between a floor and a ceiling you set. Get the
range backwards and it is repaired with a warning rather than aborting the light
cycle mid-round.
? Config that checks itself
Every value is validated when the file is read. Anything unusable is repaired to a
known default and named in the console, so a typo is visible on the first
restart instead of six weeks later:
[VincergyRLGL] 2 problem(s) found in config.yml:
[VincergyRLGL] - 'arena.default-life-mode' has invalid value 'ONELIFE', using CONTINUOUS instead
[VincergyRLGL] - 'global.max-light-delay-seconds' value '1' is out of range, clamped to 2
Keys you leave out use their defaults, so trimming the file is safe. Values are
read once into a snapshot rather than looked up during play — nothing does a
string-keyed map lookup on the movement path.
A mid-match /rlgl reload cannot change the rules of a round already running.
?️ It will not eat your arenas
Two things this plugin refuses to do:
- Overwrite a coordinate it could not read. If an arena's world is not loaded
when the server starts — routine with world managers that load worlds after
plugins — the stored coordinates are left untouched on disk and load once the
world exists.
/rlgl status lists which arenas are waiting. Saving never writes
nothing over something.
- Delete on one command.
/rlgl arena delete myarena deletes nothing. It
shows what would be lost, warns you if players are standing in it, and arms a
confirmation valid for 30 seconds. The confirmation is bound to that exact arena
name and to you, and is single use — so a stale "yes" can never land on a
different arena than the one you were shown.
Arena names are validated before they reach storage, because a name becomes a YAML
key: a dot would otherwise nest one arena inside another and quietly corrupt the
file.
? Statistics and leaderboards
Arena wins, flawless wins, global survivals and deaths, per player.
Statistics are batched and flushed periodically instead of writing the whole file
on every kill, and always saved on shutdown. Main-thread file I/O in the middle of
a match is not a feature.
With PlaceholderAPI:
%rlgl_arena_wins% %rlgl_current_arena%
%rlgl_arena_flawless_wins% %rlgl_light%
%rlgl_deaths% %rlgl_remaining_time%
%rlgl_top_arena_wins_name_1% %rlgl_top_arena_wins_value_1%
Leaderboards exclude players who never scored, so they are not padded with zeroes,
and ties break on name so the order does not shuffle between requests.
? Rewards without an economy dependency
Console commands, run on a win:
arena:
finish:
enabled: true
commands:
- 'give %player% diamond 3'
- 'eco give %player% 500'
Commands are the escape hatch that keeps the plugin dependency-free —
eco give %player% 500 works with whatever economy you already run. Separate
bundles for finishing, for finishing without dying, and for surviving a global
round. Every one ships disabled, so a fresh install pays out nothing until you
say so.
? Modular
Four modules you switch on or off: setup-tools, stats, rewards,
placeholders. A disabled module registers nothing at all — no idle listener left
attached. Turn setup-tools off once your arenas are built and its interact
handler stops running on every block click. Turn rewards off while you are
testing so test runs do not hand out prizes.
/rlgl modules tells you what is actually running.
⚙️ Built for Paper 26.2
Adventure components and boss bars throughout, attribute-based health, registry
material lookups, PluginMeta instead of the deprecated description file. Bukkit
API only — no NMS, no reflection, nothing version-locked.
No deprecated API anywhere, and the build finishes with zero compiler warnings
under -Xlint:all. Nothing is suppressed to get there.
Ships with 119 JUnit tests over the parts that actually branch: the
120 / 90s / 2m30s duration grammar including overflow and malformed input,
arena-name validation including the YAML-path and traversal cases, inclusive block
containment, one-directional finish-line crossing on diagonals and around segment
ends, leaderboard ordering and tie-breaking, light-delay bounds with a seeded
random source, and the delete confirmation's token matching, scoping and expiry —
tested against an injected clock, not a sleep.
No server-mocking framework, deliberately: logic worth testing lives in classes
that never touch Bukkit.
? Commands and permissions
16 subcommands under /rlgl, including 15 arena operations, every one with its own
permission node, usage line and tab completion. /rlgl help is generated from the
command registry and lists only what the sender can actually run, so nobody is
shown a command they cannot use.
23 permission nodes, each with a description, grouped under rlgl.admin and
rlgl.user. Every subcommand checks its own node, so granting a parent is never
required — hand out rlgl.arena.list on its own if that is all you want.
? Text
Every string a player sees is in messages.yml — 124 keys, each with its
placeholders documented in a comment beside it. Nothing is hardcoded in Java, so
you can reword or translate the whole plugin without touching code.
The plugin ships in English. There is one message file, not a per-language
loader: copy it aside, translate the values, and reload. If you need several
languages switchable at runtime, this is not that plugin yet.
Good to know
Two honest limitations, so you find them here rather than after buying:
- One arena runs at a time. Starting a different arena stops the current one.
Fine for events; not a lobby server with six simultaneous games.
- Module changes need a restart.
/rlgl reload covers every other setting in
all five YAML files, but enabling a module has to register listeners and
commands, so it happens at startup.
Full documentation ships with the plugin: a commands reference, a permissions
reference, a key-by-key configuration reference, five feature guides, an FAQ and a
troubleshooting guide.
评论 0
登录后参与评分
还没有评论,来抢沙发吧