描述
TheBridge 是一款 Minecraft Java 版服务器小游戏插件。两支队伍(1v1 或 2v2)在虚空之上的桥梁上进行战斗。向敌方建造方块、进行战斗,并通过进入敌方目标区得分。率先达到分数上限的队伍获胜。如有问题,请提交 issue。
旧版本
- 如果你需要较旧的 Minecraft 版本(1.8.8 - 1.12.x),请下载文件名以 -legacy 结尾的发布文件(例如 1.1.0-legacy)。
- 如果你需要主版本(Minecraft 1.13 - 26.x),请下载不带 -legacy 后缀的发布文件(例如 1.1.0)。
更新日志 [1.1.0-legacy]
功能特性
- 1v1 和 2v2 模式(队伍人数最多可达
match.max-team-size)
- 多个竞技场,每个竞技场保存在独立文件中
- 竞技场状态:
DISABLED(禁用)、WAITING(等待中)、STARTING(开始中)、IN_GAME(游戏中)、ENDING(结束中)、RESETTING(重置中)
- 配置校验并显示清晰错误提示(缺少必要项时无法启用竞技场)
- 无需命令即可检测目标区,防止重复目标设置
- 重生延迟、虚空死亡判定、对虚空击杀者给予击杀奖励
- 可配置装备、可建造方块、可破坏规则
- 竞技场重置:仅跟踪已更改的方块,并以小批量方式恢复
- 崩溃恢复:支持玩家(背包、位置、游戏模式等)和竞技场方块的恢复
- SQLite 统计数据(胜场、负场、进球、击杀、死亡、场次、连胜),在后台线程保存
- 标题栏、动作栏、音效、可选的控制台命令奖励
- 兼容 Spigot、CraftBukkit、Paper 及其分支
- 权限控制和 Tab 补全
安装方法
- 下载插件 jar 文件。
- 将其放入 plugins 文件夹
- 重启服务器
- 创建竞技场(参见 竞技场设置示例)
兼容性
| 服务器软件 |
预期可用? |
备注 |
| Paper, Purpur, Pufferfish, Leaves |
是 |
它们包含 Spigot API。 |
| Spigot, CraftBukkit |
是 |
CraftBukkit 拥有相同的 Bukkit API。Spigot 专属部分使用了 BungeeCord 聊天 API 用于动作栏以及 player.spigot().respawn()。纯 CraftBukkit 构建且无 Spigot 附加组件的版本将缺失这两项功能。 |
| Folia |
否 |
TheBridge 使用标准的 Bukkit 调度器,并未声明 folia-supported。 |
- “预期”意味着代码仅调用了该服务器存在的 API。仅有部分此类服务器经过测试。请反馈对你有效的情况。
命令
主命令:/thebridge(别名:/tb, /bridge)
| 命令 |
描述 |
权限 |
/thebridge help |
显示帮助命令 |
无 |
/thebridge list |
列出竞技场及其状态和玩家 |
thebridge.join |
/thebridge join [arena] |
加入竞技场(未指定名称则随机加入空闲竞技场) |
thebridge.join |
/thebridge leave |
离开当前比赛 |
thebridge.leave |
/thebridge stats [player] |
显示统计数据 |
thebridge.stats |
/thebridge create <arena> |
在当前世界创建竞技场 |
thebridge.admin |
/thebridge setup <arena> |
打开设置菜单(按钮将执行以下命令) |
thebridge.admin |
/thebridge setlobby <arena> |
将你的位置设置为等候室 |
thebridge.admin |
/thebridge setspawn <arena> <red|blue> |
将你的位置设置为某队出生点 |
thebridge.admin |
/thebridge pos1 / pos2 |
选择两个角点(供 setgoal 和 setbounds 使用) |
thebridge.admin |
/thebridge setgoal <arena> <red|blue> |
设置队伍防守的目标区 = 所选框体 |
thebridge.admin |
/thebridge setbounds <arena> |
设置竞技场范围 = 所选框体(其底部为虚空) |
thebridge.admin |
/thebridge teamsize <arena> <n> |
1 = 1v1,2 = 2v2 ... |
thebridge.admin |
/thebridge scorelimit <arena> <n> |
此竞技场获胜所需的进球数(0 = 使用 config.yml 默认值) |
thebridge.admin |
/thebridge duration <arena> <seconds> |
此竞技场比赛时长(秒)(0 = 使用 config.yml 默认值) |
thebridge.admin |
/thebridge enable <arena> |
验证并启用竞技场 |
thebridge.admin |
/thebridge disable <arena> |
关闭竞技场(安全取消正在进行的比赛) |
thebridge.admin |
/thebridge stop <arena> |
取消正在进行的比赛(不计胜负,不记录统计) |
thebridge.admin |
/thebridge info <arena> |
显示竞技场设置及存在的问题 |
thebridge.admin |
/thebridge delete <arena> |
删除一个已禁用的竞技场 |
thebridge.admin |
/thebridge reload |
重新加载 config.yml(不重载竞技场文件) |
thebridge.admin |
权限
| 权限 |
默认值 |
用途 |
thebridge.admin |
OP |
所有设置/管理命令。在对局期间也允许使用任何命令。 |
thebridge.join |
true |
加入竞技场并列出它们。 |
thebridge.leave |
true |
离开对局。 |
thebridge.stats |
true |
查看统计数据。 |
thebridge.bypass |
OP |
在空场且等待中的竞技场内建造/破坏方块(用于编辑地图)。出于安全考虑,此权限绝不对处于对局中的玩家或在有对局的竞技场内生效。 |
竞技场设置示例
先构建你的地图(两个岛屿,中间是虚空,每侧各有一个目标区)。然后,站在地图的世界中:
/thebridge create lava
/thebridge setlobby lava (站在等候室)
/thebridge setspawn lava red (站在红色出生点)
/thebridge setspawn lava blue
/thebridge pos1 (站在红色目标区的其中一个角)
/thebridge pos2 (站在对角)
/thebridge setgoal lava red (红色方在此目标区防守,蓝色方在此得分)
/thebridge pos1 (蓝色目标区的角)
/thebridge pos2
/thebridge setgoal lava blue
/thebridge pos1 (围绕整个竞技场的盒子,从虚空层一直延伸到最高建筑高度之上)
/thebridge pos2
/thebridge setbounds lava
/thebridge teamsize lava 1 (1v1;若为 2v2 则设为 2)
/thebridge enable lava
如果有遗漏项,enable 会明确告诉你。玩家随后使用 /thebridge join lava 加入。当竞技场满员时,对局开始。
经验法则: 边界(bounds)底部即为虚空:低于该位置即视为死亡。出生点必须位于边界内,且不能位于目标区内。等候室可以放置在任意位置。
单人测试(独测模式)
没有朋友或第二个账号?在 config.yml 中设置此项并运行 /thebridge reload:
match:
solo-test: true
然后单独加入一个竞技场:倒计时将在有一名玩家时启动。你扮演红色队伍,进入 蓝色 目标区即可得分。你可以测试倒计时、目标区、虚空死亡、建造规则、桥梁重置以及对局结束。你 无法 测试战斗、击杀和投降(这需要对手)。
独测模式下的对局不会写入统计数据,也不会给予奖励。该设置在玩家加入空竞技场时读取,因此请在没有对局等待时开启或关闭。在正式服务器上请将其关闭。
要在你自己的 PC 上测试双人游玩,你也可以在一个本地服务器(online-mode=false)上以离线账号运行第二个客户端。
对局流程
- 玩家加入;当竞技场满员时开始倒计时(
match.countdown)。
- 分配队伍,传送玩家并装备物品,每回合开始时有一段短暂的冻结时间(
match.round-countdown)。
- 进入 敌方 目标区得一分。重置玩家和(可选的)桥梁。
- 当达到
match.score-limit 个进球数,或 match.duration 持续时间结束时,对局终止(进球多者获胜,进球数相同则为平局)。
- 显示结果,玩家恢复原有的物品栏和位置,竞技场重置并重新开放。
在对局中途离开或断线被视为退出:你会立即收回自己的物品,如果一方队伍无人留守,另一方获胜。不支持重新加入 对局。崩溃后重新连接 服务器 可恢复你的物品和位置。
配置
所有内容均位于 plugins/TheBridge/config.yml 中(文件内有文档说明):倒计时、持续时间、分数上限、重生延迟、队伍人数上限、允许使用的方块、破坏规则、装备({team} 将变为 RED/BLUE)、重置行为、统计数据、奖励、效果以及所有消息。无效的数字会在控制台中以警告形式自动修正。每个竞技场的特定值存储在 plugins/TheBridge/arenas/<name>.yml 中。
当新插件版本需要更高版本的 config-version 时,你的旧文件会被重命名为 config-<version>.yml,并生成一个新的配置文件(与我其他插件的处理方式相同)。
竞技场重置限制
重置功能会恢复玩家放置或破坏的每个方块的 类型和方块状态(旋转、充水等……),每秒处理数百个方块。它 不 恢复以下内容:
- 容器内的物品(玩家在对局中无法打开容器),
- 除掉落物和箭之外的实体(这些会被移除),
- 沙子/砾石的重力下落、红石、TNT 连锁反应、其他插件或命令造成的更改。请勿将具有重力效果的方块或红石放入
build.allowed-blocks 中,
- 流体:桶的使用被禁止,竞技场内液体流动会被取消。
崩溃保护:变更过的方块列表每隔 reset.journal-interval 秒保存至 plugins/TheBridge/journals/。发生崩溃后,在下一次启动时将从该日志中恢复竞技场。崩溃前最后几秒内发生的方块变更可能会丢失。
统计数据
SQLite 文件 plugins/TheBridge/stats.db。所有数据库操作都在一个后台线程上运行,因此服务器永远不会因磁盘 I/O 而等待。如果出现数据库问题,会在日志中记录但绝不会中断对局。存储代码封装在 Storage 接口之后,以便将来可以添加 MySQL/MariaDB 支持;目前仅支持 SQLite。
PlaceholderAPI
可选。如果已安装 PlaceholderAPI,TheBridge 会自动注册自身(无需执行 /papi ecloud download)。可在记分板、标签页列表、全息图及聊天插件中使用这些占位符。
玩家所在比赛的占位符(若玩家不在比赛中则为空,因此记分板可隐藏该行):
| 占位符 |
值 |
%thebridge_in_game% |
true 或 false |
%thebridge_arena% |
竞技场名称 |
%thebridge_state% |
WAITING、STARTING、IN_GAME、ENDING、RESETTING |
%thebridge_team% |
Red 或 Blue |
%thebridge_team_colored% |
同上,但带有颜色代码,例如 &cRed |
%thebridge_players% / %thebridge_max_players% |
比赛中的玩家数量 / 竞技场最大容纳人数 |
%thebridge_score_red% / %thebridge_score_blue% |
各队的进球数 |
%thebridge_score_own% / %thebridge_score_enemy% |
玩家所在队伍的进球数 / 对方队伍的进球数 |
%thebridge_score_limit% |
获胜所需的进球数 |
%thebridge_countdown% |
当前倒计时剩余的秒数 |
%thebridge_time_left% |
剩余时间(非进行中的回合时为 0) |
%thebridge_time_left_formatted% |
格式同 mm:ss |
%thebridge_match_goals% / %thebridge_match_kills% / %thebridge_match_deaths% |
该玩家在本次比赛中的各项数据 |
全局统计数据(适用于任何玩家,无论在线与否;需要启用 stats.enabled):
%thebridge_stats_wins%、_losses、_goals、_kills、_deaths、_matches、_winstreak、_beststreak、_kd、_winrate,例如 %thebridge_stats_wins%。
统计数据在后台读取并保留 10 秒,因此玩家首次请求时可能会短暂显示为 0。
服务器全局范围:
| 占位符 |
值 |
%thebridge_total_players% |
所有比赛中的玩家总数 |
%thebridge_arenas_available% |
当前可加入的竞技场数量 |
%thebridge_arena_players_<arena>% |
指定竞技场中的玩家数量 |
%thebridge_arena_max_<arena>% |
指定竞技场的最大容纳人数 |
%thebridge_arena_state_<arena>% |
指定竞技场的状态 |
手动测试清单
需要真实服务器环境的事项(自动化测试未覆盖):
- 插件无错误启用,
/thebridge help 命令正常工作
- 按照上述步骤设置 1v1 竞技场,
enable 命令能正确接受配置
- 两名玩家:倒计时、传送、装备分配、冻结开局
- 向对方球门得分,不为己方球门计分,无重复计分
- 玩家击杀、虚空死亡;重生延迟;虚空击杀的击杀归属判定
- 放置与破坏方块:仅限允许放置的方块,仅在边界内有效,球门区域受保护
- 比赛结束:结算结果、物品栏与位置恢复、桥梁移除
- 在各阶段(等待中、倒计时中、进行中、结束中)执行
/thebridge leave 或直接退出游戏
- 在进行中的比赛中执行
/thebridge disable;或在比赛中间执行 /stop 并禁用插件
- 在比赛中终止服务器进程后重启:竞技场状态恢复,玩家重新加入时找回物品
- 2v2 模式下队友离开的情况
-
match.solo-test: true:单人可开始比赛且不会写入统计数据
- 比赛结束后执行
/thebridge stats
故障排除
| 问题 |
检查事项 |
enable 列出问题 |
修复每一行;/thebridge info <arena> 会显示相同的列表 |
| “World ... is not loaded” |
TheBridge 启用前必须加载竞技场所在的维度(世界类插件:需优先加载它们) |
| 控制台中显示“Arena stays disabled” |
与上述相同的问题列表,会在启动时记录日志 |
| 玩家无法放置方块 |
该方块必须位于 build.allowed-blocks 列表中,且在边界内、球门外,同时回合必须正在进行中 |
| 球门无效 |
你必须进入对方队伍的球门,且球门框必须位于边界内部 |
| 玩家立即死亡 |
setbounds 的底部即为虚空。请确保其位于你的岛屿下方 |
| 统计数据提示“不可用” |
是否设置了 stats.enabled: true?查看控制台是否有 SQLite 相关错误 |
| 桥梁未被移除 |
检查控制台是否有 “Cannot restore a block”(维度未加载),参见上方的限制说明 |
项目结构
org.kylan1940.thebridge
TheBridge 主类:创建所有组件并连接它们
arena/ Arena(数据与验证)、ArenaState、ArenaManager(保存/加载)、Point、Region
match/ Match(单局比赛的规则)、MatchManager(运行比赛)、MatchTeam
player/ PlayerSnapshot(保存/恢复玩家状态)、EquipmentGiver(提供装备包)
reset/ BlockTracker(追踪变化)、ArenaResetter(还原方块)、BlockKey
stats/ StatsManager(后台线程)、PlayerStats、PlayerResult、MatchRecord
storage/ Storage(接口)、SQLiteStorage、StorageException
command/ BridgeCommand、BridgeTabCompleter
listener/ BlockListener(方块交互)、PlayerListener(移动、伤害、退出)
config/ GameSettings(从 config.yml 校验数值)
message/ MessageUtil(消息、标题、音效)
utils/ ConfigUpdater、LocationUtil
许可证
Apache License 2.0,详见 LICENSE。
Description
TheBridge is a Minecraft Java Server minigame plugin. Two teams (1v1 or 2v2) fight on bridges over the void. Build blocks toward the enemy, fight, and score by entering the enemy goal. First team to the score limit wins. If you have a question, please make an issue.
Legacy Version
- If you need an older Minecraft version (1.8.8 - 1.12.x), download the release file that ends with -legacy (e.g. 1.1.0-legacy).
- If you need the main version (Minecraft 1.13 - 26.x), download the release file without the -legacy suffix (e.g. 1.1.0).
Changelogs [1.1.0-legacy]
Features
- 1v1 and 2v2 (any team size up to
match.max-team-size)
- Multiple arenas, each saved in its own file
- Arena states:
DISABLED, WAITING, STARTING, IN_GAME, ENDING, RESETTING
- Setup validation with clear errors (an arena can't be enabled while something is missing)
- Goal detection without commands, duplicate-goal protection
- Respawn delay, void death, kill credit for void kills
- Configurable equipment, buildable blocks, break rules
- Arena reset: only changed blocks are tracked and restored in small batches
- Crash recovery for players (inventory, location, game mode ...) and for arena blocks
- SQLite statistics (wins, losses, goals, kills, deaths, matches, win streak), saved on a background thread
- Titles, action bar, sounds, optional console-command rewards
- Runs on Spigot, CraftBukkit, Paper and Paper forks
- Permissions and tab completion
Installation
- Download the plugin jar.
- Put it into the plugins folder
- Restart the server
- Create an arena (see Arena setup)
Compatibility
| Server software |
Expected to work? |
Notes |
| Paper, Purpur, Pufferfish, Leaves |
Yes |
They contain the Spigot API. |
| Spigot, CraftBukkit |
Yes |
CraftBukkit has the same Bukkit API. Spigot-only parts used: the BungeeCord chat API for the action bar and player.spigot().respawn(). A pure CraftBukkit build without the Spigot additions would lack these two. |
| Folia |
No |
TheBridge uses the normal Bukkit scheduler and does not declare folia-supported. |
- "Expected" means the code only calls API that exists there. Only some of these servers have been tested. Please report what works for you.
Commands
Main command: /thebridge (aliases: /tb, /bridge)
| Command |
Description |
Permission |
/thebridge help |
Show the commands |
none |
/thebridge list |
List arenas with state and players |
thebridge.join |
/thebridge join [arena] |
Join an arena (random free one if no name) |
thebridge.join |
/thebridge leave |
Leave your match |
thebridge.leave |
/thebridge stats [player] |
Show statistics |
thebridge.stats |
/thebridge create <arena> |
Create an arena in your current world |
thebridge.admin |
/thebridge setup <arena> |
Open the setup menu (buttons run the commands below) |
thebridge.admin |
/thebridge setlobby <arena> |
Set the waiting room to your position |
thebridge.admin |
/thebridge setspawn <arena> <red|blue> |
Set a team spawn to your position |
thebridge.admin |
/thebridge pos1 / pos2 |
Select two corners (used by setgoal and setbounds) |
thebridge.admin |
/thebridge setgoal <arena> <red|blue> |
Set the goal that team defends = the selected box |
thebridge.admin |
/thebridge setbounds <arena> |
Set the arena box = the selected box (its bottom is the void) |
thebridge.admin |
/thebridge teamsize <arena> <n> |
1 = 1v1, 2 = 2v2 ... |
thebridge.admin |
/thebridge scorelimit <arena> <n> |
Goals to win for this arena (0 = use config.yml) |
thebridge.admin |
/thebridge duration <arena> <seconds> |
Match length for this arena (0 = use config.yml) |
thebridge.admin |
/thebridge enable <arena> |
Validate and open the arena |
thebridge.admin |
/thebridge disable <arena> |
Close the arena (safely cancels a running match) |
thebridge.admin |
/thebridge stop <arena> |
Cancel the running match (no winner, no stats) |
thebridge.admin |
/thebridge info <arena> |
Show the arena setup and any problems |
thebridge.admin |
/thebridge delete <arena> |
Delete a disabled arena |
thebridge.admin |
/thebridge reload |
Reload config.yml (not the arena files) |
thebridge.admin |
Permissions
| Permission |
Default |
Purpose |
thebridge.admin |
OP |
All setup/management commands. Also allows any command during a match. |
thebridge.join |
true |
Join arenas and list them. |
thebridge.leave |
true |
Leave a match. |
thebridge.stats |
true |
View statistics. |
thebridge.bypass |
OP |
Build/break inside an arena that is empty and waiting (for editing the map). It never works for players in a match or inside an arena with a match, on purpose. |
Arena setup example
Build your map first (two islands, a void in between, a goal on each side). Then, standing in the map's world:
/thebridge create lava
/thebridge setlobby lava (stand in the waiting room)
/thebridge setspawn lava red (stand on the red spawn)
/thebridge setspawn lava blue
/thebridge pos1 (stand in one corner of the RED goal)
/thebridge pos2 (stand in the opposite corner)
/thebridge setgoal lava red (red DEFENDS this goal, blue scores here)
/thebridge pos1 (corners of the BLUE goal)
/thebridge pos2
/thebridge setgoal lava blue
/thebridge pos1 (a box around the WHOLE arena, from the void level up to above the highest build height)
/thebridge pos2
/thebridge setbounds lava
/thebridge teamsize lava 1 (1v1; use 2 for 2v2)
/thebridge enable lava
If something is missing, enable tells you exactly what. Players then use /thebridge join lava. The match starts when the arena is full.
Rules of thumb: the bottom of the bounds is the void: falling below it is a death. Spawns must be inside the bounds and not inside a goal. The lobby can be anywhere.
Testing alone (solo test mode)
No friend or second account? Set this in config.yml and run /thebridge reload:
match:
solo-test: true
Then join an arena alone: the countdown starts with one player. You are team RED and score by entering the blue goal. You can test the countdown, goals, void deaths, building rules, bridge reset and the end of the match. You can not test fighting, kills and forfeits (that needs an opponent).
Matches in solo test mode never write to the statistics and never give rewards. The setting is read when a player joins an empty arena, so switch it on or off while no match is waiting. Turn it off again on a real server.
To test with two players on your own PC you can also run a second client with an offline account on a local server (online-mode=false).
Match flow
- Players join; when the arena is full a countdown starts (
match.countdown).
- Teams are assigned, players are teleported and equipped, a short freeze (
match.round-countdown) starts every round.
- Entering the enemy goal scores one point. Players and (optionally) bridges are reset.
- The match ends at
match.score-limit goals, or when match.duration runs out (more goals wins, equal goals = draw).
- Results are shown, players get their old inventory and position back, the arena resets and opens again.
Leaving or disconnecting mid-match counts as leaving: you get your own items back immediately, and if a team has nobody left the other team wins. Rejoining the match is not supported. Rejoining the server after a crash restores your items and position.
Configuration
Everything is in plugins/TheBridge/config.yml (documented inside the file): countdown, duration, score limit, respawn delay, team size limit, allowed blocks, break rules, equipment ({team} becomes RED/BLUE), reset behaviour, statistics, rewards, effects and all messages. Invalid numbers are corrected with a warning in the console. Per-arena values live in plugins/TheBridge/arenas/<name>.yml.
When a new plugin version needs a newer config-version, your old file is renamed to config-<version>.yml and a fresh one is written (same as in my other plugins).
Arena reset limitations
The reset restores the type and block state (rotation, waterlogged, ...) of every block a player placed or broke, a few hundred per tick. It does not restore:
- items inside containers (players can't open containers in a match),
- entities other than dropped items and arrows (those are removed),
- sand/gravel falling, redstone, TNT chains, changes by other plugins or commands. Don't put gravity blocks or redstone in
build.allowed-blocks,
- fluids: buckets are blocked and liquid flow is cancelled inside arenas.
Crash safety: the list of changed blocks is saved to plugins/TheBridge/journals/ every reset.journal-interval seconds. After a crash the arena is restored from it on the next start. Blocks changed in the last few seconds before a crash can be missed.
Statistics
SQLite file plugins/TheBridge/stats.db. All database work runs on one background thread, so the server never waits for the disk. A database problem is logged and never stops a match. The storage code is behind the Storage interface so MySQL/MariaDB can be added later; only SQLite exists now.
PlaceholderAPI
Optional. If PlaceholderAPI is installed, TheBridge registers itself automatically (no /papi ecloud download needed). Use the placeholders in scoreboards, tab lists, holograms and chat plugins.
Placeholders of the match a player is in (empty when the player is not in a match, so a scoreboard can hide the lines):
| Placeholder |
Value |
%thebridge_in_game% |
true or false |
%thebridge_arena% |
Arena name |
%thebridge_state% |
WAITING, STARTING, IN_GAME, ENDING, RESETTING |
%thebridge_team% |
Red or Blue |
%thebridge_team_colored% |
Same with colour code, for example &cRed |
%thebridge_players% / %thebridge_max_players% |
Players in the match / the arena maximum |
%thebridge_score_red% / %thebridge_score_blue% |
Goals of each team |
%thebridge_score_own% / %thebridge_score_enemy% |
Goals of the player's team / the other team |
%thebridge_score_limit% |
Goals needed to win |
%thebridge_countdown% |
Seconds of the running countdown |
%thebridge_time_left% |
Seconds left (0 outside a running round) |
%thebridge_time_left_formatted% |
Same as mm:ss |
%thebridge_match_goals% / %thebridge_match_kills% / %thebridge_match_deaths% |
The player's numbers in this match |
Lifetime statistics (any player, online or not; needs stats.enabled):
%thebridge_stats_wins%, _losses, _goals, _kills, _deaths, _matches, _winstreak, _beststreak, _kd, _winrate, for example %thebridge_stats_wins%.
Stats are read in the background and kept for 10 seconds, so a player's very first request can show 0 for a moment.
Server wide:
| Placeholder |
Value |
%thebridge_total_players% |
Players in any match |
%thebridge_arenas_available% |
Arenas that can be joined right now |
%thebridge_arena_players_<arena>% |
Players in that arena |
%thebridge_arena_max_<arena>% |
Maximum players of that arena |
%thebridge_arena_state_<arena>% |
State of that arena |
Manual test checklist
Things that need a real server (not covered by the automated tests):
- Plugin enables without errors,
/thebridge help works
- Setup of a 1v1 arena as above,
enable accepts it
- Two players: countdown, teleport, equipment, frozen start
- Scoring in the enemy goal, no score in your own goal, no double score
- Death by player, by void; respawn delay; kill credit for a void kill
- Place and break blocks: only allowed blocks, only inside the bounds, goals protected
- End of match: results, inventory/position restored, bridges removed
-
/thebridge leave and quitting in each state (waiting, countdown, running, ending)
-
/thebridge disable during a running match; /stop and plugin disable in the middle of a match
- Kill the server process in a match, restart: arena restored, player gets items back on join
- 2v2 with a teammate leaving
-
match.solo-test: true: one player can start a match and no stats are written
-
/thebridge stats after a match
Troubleshooting
| Problem |
What to check |
enable lists problems |
Fix each line; /thebridge info <arena> shows the same list |
| "World ... is not loaded" |
The arena's world must be loaded before TheBridge enables (world plugins: load them first) |
| "Arena stays disabled" in the console |
Same list as above, logged at startup |
| Players can't place blocks |
The block must be in build.allowed-blocks, inside the bounds, outside the goals and the round must be running |
| Goal doesn't count |
You must enter the goal of the other team, and the goal box must be inside the bounds |
| Players die instantly |
The bottom of setbounds is the void. Make sure it is below your islands |
| Stats say "not available" |
stats.enabled: true? Look for a SQLite error in the console |
| Bridges not removed |
Check the console for "Cannot restore a block" (world unloaded), see limitations above |
Project structure
org.kylan1940.thebridge
TheBridge main class: creates everything, wires it together
arena/ Arena (data + validation), ArenaState, ArenaManager (save/load), Point, Region
match/ Match (the rules of ONE match), MatchManager (runs matches), MatchTeam
player/ PlayerSnapshot (save/restore a player), EquipmentGiver (kits)
reset/ BlockTracker (what changed), ArenaResetter (puts it back), BlockKey
stats/ StatsManager (background thread), PlayerStats, PlayerResult, MatchRecord
storage/ Storage (interface), SQLiteStorage, StorageException
command/ BridgeCommand, BridgeTabCompleter
listener/ BlockListener (building), PlayerListener (moving, damage, quitting)
config/ GameSettings (checked numbers from config.yml)
message/ MessageUtil (messages, titles, sounds)
utils/ ConfigUpdater, LocationUtil
License
Apache License 2.0, see LICENSE.
评论 0
登录后参与评分
还没有评论,来抢沙发吧