QuestCore
一个完整的任务体验插件 —— 零依赖。
使用 YAML 编写任务。通过你放置的任务发布者分发任务。在世界中的真实箱子里交付物品。让玩家在日志中浏览所有内容,并显示实时进度条。将故事内容与按钮文本分开翻译。只需运行一条命令,就能在玩家发现问题之前排查所有错误。
无需数据库。无需 Citizens。无需 WorldGuard。无需经济插件。无需 Bedrock 表单工具包。所有内容均为可读的 YAML,且玩家看到的每个单词都提供 英文和荷兰文 版本。
? 可读性强的 YAML 任务
miner_pickaxe:
name: '&6Lost Family Pickaxe'
description: 'Bring 10 gold ingots to the Miner Supply Chest.'
npc-id: 1
prerequisites: []
objectives:
- id: pickaxe_gold
type: DEPOSIT_TO_CHEST
target: 1:GOLD_INGOT
amount: 10
rewards:
xp: 120
commands:
- 'eco give {player} 2000'
八种目标类型: KILL_MOB(击杀生物)、BREAK_BLOCK(破坏方块)、PLACE_BLOCK(放置方块)、
COLLECT_ITEM(收集物品)、TALK_TO_NPC(与 NPC 对话)、VISIT_ZONE(访问区域)、DEPOSIT_TO_CHEST(存入箱子)、
WITHDRAW_FROM_CHEST(从箱子取出)。
支持前置条件链、可重复任务、可选权限门,以及由物品、经验值、控制台指令和聊天消息组成的奖励。指令是保持插件无依赖的关键机制 —— eco give {player} 2000 兼容你已运行的任何经济插件。
? 无法被滥用的任务箱子
世界中玩家右键点击的真实箱子。
- 交付模式 精确提取玩家任务所需的部分,并将剩余部分直接退还。不存储任何多余内容,因此绝不能用作免费储物柜,也无法窃取其他玩家的交付物。
- 存储模式 保留其内容 —— 按玩家个人区分,或由管理员充货的一个共享箱子 —— 并将前后差异转化为进度,从而防止通过 shift-click、拖拽或快捷栏交换绕过记账系统。
- 每个箱子拥有 物品白名单、可配置的大小和标题,以及仅管理员可破坏方块的权限。
/questchest create | place | mode | title | filter | shared | link。
?? 插件自有的任务发布者 NPC
无需 Citizens。站在你想放置的位置放置一个,赋予它名称、一行角色描述,并为每种语言设置问候语,然后选择任意活体实体作为其外观(或选择 NONE 以在你自行建造的建筑物上方创建一个不可见的点击点)。
右键点击它:问候语出现在聊天框中,一行文字提醒玩家当前处于哪个目标阶段,并打开该 NPC 对应的任务日志页面。
全息图 限制为三行 —— 名称、角色、提示 —— 此限制在代码层面强制执行,而不仅仅是在配置文件中。
? 值得打开的日志
包含进行中、可用和已完成任务的标签页,以及每个任务发布者的独立页面。任务卡片带有状态颜色、实时进度条和百分比,每个目标单独标记完成,并提供奖励预览 —— 控制台指令显示为“特殊奖励”,而非泄露你的内部逻辑。
基于自包含的菜单框架构建,该框架会取消所有物品移动操作,因此日志绝不可能被用于复制物品。
? 翻译故事,而非按钮
任务标题、描述和目标文本位于独立的 quest-content_<code>.yml 文件中,与界面字符串分离。翻译人员可以在不影响界面的情况下专注于故事内容,任何玩家都可以通过 /questlang 独立于界面设置自己的任务语言。
缺少键值?系统将回退到默认语言,然后回退到 quests.yml,最后回退到根据每类模板生成的行。半完成的翻译降级为 实际可用的文字,绝不会变成占位符。
? 轮换的日常与每周任务
可选的按玩家每日和每周目标,具有正确的重置窗口,复用与其他功能相同的目标类型和奖励包。
? 包审计
你最常用的功能。
/questaudit
[ERROR] chest '1' does not accept ANCIENT_DEBRIS, but 'miner_drill' tells players to deposit it
[ERROR] quest 'book_medals' needs prerequisite 'book_scroll', which does not exist
[ERROR] quest 'side_a' can never be started (broken or circular prerequisites)
[WARN] quest 'elias_craft' points at quest giver #3, which has no position yet
悬空的前置条件、循环链、无法触发的任务、缺失的箱子和 NPC、未知的物品和实体、格式错误的目标、拒绝任务所求物品的箱子,以及每种语言的翻译缺失。
通常损坏的任务不会抛出异常——它只是悄无声息地永远无法完成。此功能正是为了发现这些问题而生。
实体卫生是首要重点
此插件为浮动文本生成显示实体,因此设计注重整洁:
- 每个实体均在 预生成阶段 配置并标记为 非持久化 —— 服务器永远不会将全息图写入区域文件,因此崩溃或硬重启后 不留任何痕迹。
- 每个实体均 标记 了其 NPC ID 和角色,以便始终识别孤儿实体 —— 即使来自旧版本的构建。
- 清理扫描在启用时(在生成任何实体之前)、区块加载时 以及 定时触发,此外还支持按需执行
/questnpc cleanup。
- 绝不使用区块票。 任务枢纽不会导致永久加载区块。
- 实体主体 关闭 AI 且无敌、无声、不可碰撞。
- 仅使用 Bukkit API —— 无 NMS,无反射,无版本锁定内容。
模块化 & 独立运行
七个可开关的模块:quests、questchests、questnpcs、journal、questlang、dynamicquests、questaudit。如果某模块的依赖未开启,它将记录 一行清晰的日志 并保持关闭状态,而不是半启动 —— 一个默默吞噬物品的箱子比根本无法打开的箱子更糟糕。
所有数据均为纯 YAML,你可以手动打开、读取和修复。
专为 Paper 26.1 构建
到处都有冒险组件、基于注册表的类型查找、预生成实体配置以及 TextDisplay 全息投影。没有任何被标记为“待移除”的废弃 API,构建过程也完全没有编译器警告。
附带 94 个 JUnit 测试,覆盖关键部分:目标类型解析、前置条件/可重复性/权限门控矩阵、每个目标的进度记录、<chestId>:<MATERIAL> 的解析与匹配、箱子前后差异计算、长方体区域包含判断、每日和每周重置窗口数学逻辑、三行全息显示上限、进度条渲染,以及审计中的图检查(包括循环检测)。
语言
默认支持英文和荷兰文,适用于界面和任务内容。只需复制一个文件即可添加你自己的语言。
QuestCore
A whole quest experience in one plugin — and not a single dependency.
Write quests in YAML. Hand them out with quest givers you place yourself. Take
deliveries in real chests in the world. Let players browse everything in a
journal with live progress bars. Translate the story separately from the buttons.
And run one command to find every problem before your players do.
No database. No Citizens. No WorldGuard. No economy plugin. No Bedrock form
toolkit. Everything is YAML you can read, and every word a player sees ships in
English and Dutch.
? Quests, in YAML you can actually read
miner_pickaxe:
name: '&6Lost Family Pickaxe'
description: 'Bring 10 gold ingots to the Miner Supply Chest.'
npc-id: 1
prerequisites: []
objectives:
- id: pickaxe_gold
type: DEPOSIT_TO_CHEST
target: 1:GOLD_INGOT
amount: 10
rewards:
xp: 120
commands:
- 'eco give {player} 2000'
Eight objective types: KILL_MOB, BREAK_BLOCK, PLACE_BLOCK,
COLLECT_ITEM, TALK_TO_NPC, VISIT_ZONE, DEPOSIT_TO_CHEST,
WITHDRAW_FROM_CHEST.
Prerequisite chains, repeatable quests, an optional permission gate, and rewards
made of items, XP, console commands and chat lines. Commands are the escape
hatch that keeps the plugin dependency-free — eco give {player} 2000 works
with whatever economy plugin you already run.
? Quest chests that cannot be abused
A real chest in your world that players right-click.
- Delivery mode takes exactly what the player's quests still need and hands
the rest straight back. Nothing is stored, so it can never be used as free
storage and nobody can take another player's delivery.
- Storage mode keeps its contents — personal per player, or one shared box an
admin can stock — and turns the before/after difference into progress, so no
shift-click, drag or hotbar swap can slip past the accounting.
- A per-chest item whitelist, a configurable size and title, and admin-only
block breaking.
/questchest create | place | mode | title | filter | shared | link.
?? Quest-giver NPCs — the plugin's own
No Citizens. Place one where you stand, give it a name, a one-line role and a
greeting in each language, and pick any living entity as its body (or NONE
for an invisible click point over a build you made yourself).
Right-click it: the greeting appears in chat, a line reminds the player which
objective they are on, and the journal opens on that NPC's quests.
Holograms are capped at three lines — name, role, hint — enforced in code,
not just in config.
? A journal worth opening
Tabs for in-progress, available and completed quests, plus a page per quest
giver. Quest cards with status colours, live progress bars and percentages,
every objective ticked off individually, and a reward preview — with console
commands shown as "A special reward" rather than leaking your internals.
Built on a self-contained menu framework that cancels every item movement, so a
journal can never be used to duplicate items.
? Translate the story, not the buttons
Quest titles, descriptions and objective text live in their own
quest-content_<code>.yml, separate from the interface strings. A translator can
work on your story without scrolling past error messages, and any player can pick
their own quest language with /questlang — independently of the interface.
Missing a key? It falls back to the default language, then to quests.yml, then
to a generated line from a per-type template. A half-finished translation
degrades to real words, never to a placeholder.
? Rotating dailies and weeklies
Optional per-player daily and weekly objectives with proper reset windows,
reusing the same objective types and reward bundles as everything else.
? The package audit
The feature you will use most.
/questaudit
[ERROR] chest '1' does not accept ANCIENT_DEBRIS, but 'miner_drill' tells players to deposit it
[ERROR] quest 'book_medals' needs prerequisite 'book_scroll', which does not exist
[ERROR] quest 'side_a' can never be started (broken or circular prerequisites)
[WARN] quest 'elias_craft' points at quest giver #3, which has no position yet
Dangling prerequisites, circular chains, unreachable quests, missing chests and
NPCs, unknown items and entities, malformed targets, chests that reject the very
item a quest asks for, and per-language translation gaps.
A quest that is broken normally does not throw — it just quietly never completes.
This finds those.
Entity hygiene is the headline
This plugin spawns display entities for the floating text, so it is built to be
tidy:
- Every entity is configured pre-spawn and marked non-persistent — the
server never writes a hologram into a region file, so a crash or a hard restart
leaves nothing behind.
- Every entity is tagged with its NPC id and role, so an orphan can always be
identified — even one from an older build.
- Sweeps run on enable (before anything is spawned), on chunk load, and
on a timer, plus
/questnpc cleanup on demand.
- No chunk tickets, ever. A quest hub does not cost you a permanently loaded
chunk.
- Bodies have AI off and are invulnerable, silent and non-collidable.
- Bukkit API only — no NMS, no reflection, nothing version-locked.
Modular & standalone
Seven modules you switch on or off: quests, questchests, questnpcs,
journal, questlang, dynamicquests, questaudit. A module whose dependency
is off logs one clear line and stays off rather than half-starting — a chest
that silently swallows items is worse than a chest that does not open.
All data is plain YAML you can open, read and repair by hand.
Built for Paper 26.1
Adventure components everywhere, registry-based type lookups, pre-spawn entity
configuration, TextDisplay holograms. No deprecated-for-removal API anywhere,
and the build finishes with zero compiler warnings.
Ships with 94 JUnit tests covering the parts that matter: objective-type
parsing, the prerequisite/repeatability/permission gate matrix, per-objective
progress bookkeeping, <chestId>:<MATERIAL> parsing and matching, chest
before/after deltas, cuboid-zone containment, daily and weekly reset-window
maths, the three-line hologram cap, progress-bar rendering, and the audit's
graph checks including cycle detection.
Languages
English and Dutch out of the box, for both the interface and the quest content.
Add your own by copying one file.
评论 0
登录后参与评分
还没有评论,来抢沙发吧