
一款适用于 Spigot/Paper 服务器的问答游戏插件。在聊天中提出多项选择题,玩家通过在竞技场中站在对应颜色的方块上来作答。提问期间玩家的聊天会被静音,以防止有人剧透答案。
一场 Trivia 游戏分为若干轮,每轮包含数量不等的题目。主持人通过命令来控制游戏流程:
/trivia game start - 注册所有在线玩家(拥有 trivia.ignored 权限的玩家除外)。
/trivia round start - 在聊天和屏幕标题中宣布当前轮次编号及其名称。
/trivia round ask - 提出下一道题目。重复此操作直到本轮结束,然后执行 /trivia round start 进入下一轮。
题目会在聊天中广播,三秒后出现选项,分别标记为 A、B、C……等。字母与 block_options 中的方块绑定。每个选项对应的方块位置在每次提问时都会随机打乱,因此玩家需要每次都阅读选项内容。
玩家移动到与其答案匹配的方块垫上。在选项出现后的 answer_delay 秒,系统揭示正确答案:检查每个玩家脚下的方块(向下搜索至 block_search_lower_bound 高度),任何未站在正确方块上的玩家均视为回答错误。
从执行 /trivia round start 或 /trivia round ask 开始,直到答案揭示为止,玩家聊天将被静音,以防止有人打字泄露答案。如果需要有人在提问期间发言(例如主持人或旁观者),请授予其 trivia.ignored 权限。
游戏模式
| 模式 |
描述 |
casual |
答对得分;无人被淘汰。中途加入服务器的玩家会自动被纳入游戏,/trivia game scoreboard 可查看排行榜。 |
competitive (默认) |
答错即淘汰玩家。当仅剩一名玩家时,游戏结束并宣布获胜者(若 end_game_on_lone_player 为 true)。 |
命令
所有命令仅限主持人使用,共享别名 /tr。
| 命令 |
描述 |
/trivia reload |
重新加载 config.yml、questions.yml 和 trivia-messages.yml。重置轮次和题目进度,随后需执行 /trivia game start 以重新开始游戏。 |
/trivia game start |
启动游戏,包含所有在线且未被忽略的玩家。 |
/trivia round start |
开始下一轮——如果是刚开始游戏,则开始第一轮;否则开始下一轮。 |
/trivia round ask |
在当前轮次中提出下一道题目。 |
/trivia game scoreboard <top N> |
广播排名前 N 位的玩家。仅在 game_type 为 casual 时有效。 |
权限
| 权限 |
默认值 |
描述 |
trivia.host |
服务器管理员 |
用于使用 /trivia 命令。游戏中检查的节点值为 config.yml 中的 permission_host(默认为 trivia.host);该命令也在 plugin.yml 中注册为 trivia.host,因此该节点始终必需。 |
trivia.ignored |
无 |
将玩家排除在游戏之外:他们不会被注册参赛,且在提问期间可以正常聊天。建议授予主持人和旁观者此权限。 |
配置
config.yml
| 键 |
默认值 |
描述 |
permission_host |
trivia.host |
启用 /trivia 命令的使用权限。 |
permission_ignored |
trivia.ignored |
玩家不计入游戏统计。 |
game_type |
competitive |
casual 或 competitive |
block_options |
blue/red/yellow concrete |
有序的 material: "&colour" 映射表。键为原版材质名称,未知的材质将被跳过。 |
answer_delay |
5 |
选项出现到答案揭示之间的秒数。 |
block_search_lower_bound |
-64 |
搜索玩家脚下方块的最低 Y 轴坐标。 |
scoreboard_cutoff |
5 |
排行榜上每个分数段显示的最大玩家名称数量。 |
end_game_on_lone_player |
true |
当仅剩一名玩家时结束游戏并宣布获胜者(仅限竞技模式)。 |
questions.yml
轮次按文件顺序进行,每轮内的题目也按文件顺序提问。
| 键 |
描述 |
rounds |
round 对象的列表。 |
round.name |
轮次名称,在轮次开始时显示。 |
round.questions |
question 对象的列表。 |
question.question |
要提出的问题。 |
question.answer |
正确答案。 |
question.incorrectAnswers |
错误答案列表。 |
rounds:
- name: "General Knowledge"
questions:
- question: "What is the capital of Norway?"
answer: "Oslo"
incorrectAnswers:
- "Helsinki"
- "Stockholm"
- "Berlin"
每道题会展示正确答案加上若干错误答案,总选项数最多为 min(block_options 中方块数量, incorrectAnswers + 1) —— 多余的答案会从错误答案列表中随机抽取。请确保提供的错误答案数量比可用方块少至少一个(例如默认有 3 个方块,则提供 2 个错误答案),以便每个方块垫都能被用到。
trivia-messages.yml
所有值均支持 & 颜色代码。
| 键 |
占位符 |
触发广播时机 |
game_start |
- |
游戏开始时。 |
round_start |
%d = 轮次编号 |
轮次开始时。 |
scoreboard |
%d = 分数 |
排行榜的每个分数段。 |
game_end |
%s = 获胜者姓名 |
玩家赢得游戏时。 |

A game-show plugin for Spigot/Paper servers. Asks multiple-choice questions in chat, and players answer by standing on the matching coloured block in an arena. Player chat is muted while questions are live, so nobody can spoil the answers.
A game of Trivia is split into rounds, where each round contains a variable number of questions. The host drives the game with commands:
/trivia game start - enrols every online player except those with the trivia.ignored permission.
/trivia round start - announces the round number and its name, in chat and as an on-screen title.
/trivia round ask - asks the next question. Repeat until the round runs out, then /trivia round start for the next one.
The question is broadcast in chat, and three seconds later the answer options appear, labelled A, B, C, …. Letters are tied to block_options. Which answer appears under each letter is shuffled every question, so players must read the options each time.
Players move onto the pad matching their answer. answer_delay seconds after the options appear, the correct answer is revealed: the block beneath each player is checked (searching downward to block_search_lower_bound), and anyone not standing on the correct block counts as wrong.
Player chat is muted from /trivia round start / /trivia round ask until the answer is revealed, so answers can't be typed out. Grant trivia.ignored to anyone (such as the host) who needs to talk during a question.
Game modes
| Mode |
Description |
casual |
Correct answers score a point; nobody is eliminated. Players who join the server mid-game are added automatically, and /trivia game scoreboard shows the standings. |
competitive (default) |
A wrong answer kills the player. When only one player remains, the game ends and the winner is announced (if end_game_on_lone_player is true). |
Commands
All commands are host-only and share the alias /tr.
| Command |
Description |
/trivia reload |
Reloads config.yml, questions.yml, and trivia-messages.yml. Round and question progress is reset, so follow up with /trivia game start to restart the game. |
/trivia game start |
Starts a game with all online, non-ignored players. |
/trivia round start |
Starts the next round — the first round if the game has just started, otherwise the next one. |
/trivia round ask |
Asks the next question in the current round. |
/trivia game scoreboard <top N> |
Broadcasts the players with the top N scores. Only functional when game_type is casual. |
Permissions
| Permission |
Default |
Description |
trivia.host |
Server operators |
Required to use the /trivia commands. The node checked in-game is the value of permission_host in config.yml (default trivia.host); the command is also registered with trivia.host in plugin.yml, so that node is always required. |
trivia.ignored |
Nobody |
Excludes a player from the game: they are never enrolled, and they can chat while questions are live. Grant this to hosts and spectators. |
Configuration
config.yml
| Key |
Default |
Description |
permission_host |
trivia.host |
Enables the use of the /trivia commands. |
permission_ignored |
trivia.ignored |
Player is not counted in the game. |
game_type |
competitive |
casual or competitive |
block_options |
blue/red/yellow concrete |
Ordered material: "&colour" map. Keys are vanilla material names, unknown ones are skipped. |
answer_delay |
5 |
Seconds between the options appearing and the answer being revealed. |
block_search_lower_bound |
-64 |
The lowest y-level searched beneath a player for the block they're standing on. |
scoreboard_cutoff |
5 |
Maximum player names listed per score on the scoreboard. |
end_game_on_lone_player |
true |
End the game and announce the winner when only one player remains (competitive). |
questions.yml
Rounds are played in file order, and questions within a round are asked in file order.
| Key |
Description |
rounds |
A list of round objects. |
round.name |
The round's name, shown when the round starts. |
round.questions |
A list of question objects. |
question.question |
The question to be asked. |
question.answer |
The correct answer. |
question.incorrectAnswers |
A list of incorrect answers. |
rounds:
- name: "General Knowledge"
questions:
- question: "What is the capital of Norway?"
answer: "Oslo"
incorrectAnswers:
- "Helsinki"
- "Stockholm"
- "Berlin"
Each question shows the correct answer plus incorrect ones, up to min(number of blocks in block_options, incorrectAnswers + 1) options in total - extra incorrect answers are randomly sampled. Provide at least one fewer incorrect answer than you have blocks (e.g. 2 for the default 3 blocks) so every pad gets used.
trivia-messages.yml
All values support & colour codes.
| Key |
Placeholder |
Broadcast when |
game_start |
- |
A game starts. |
round_start |
%d = round number |
A round starts. |
scoreboard |
%d = score |
Each score tier on the scoreboard. |
game_end |
%s = winner's name |
A player wins the game. |
评论 0
登录后参与评分
还没有评论,来抢沙发吧