玩家间的数字合约系统 —— 出售、交付、支付、收集资源、保护、悬赏狩猎或提供服务,所有交易均由安全的 Vault 托管资金担保。
Contracts 允许玩家之间达成具有约束力的协议:定义目标和奖励,设定截止日期,并让插件自动跟踪进度并进行支付。再也不用担心“信我兄弟”式的交易了。
✨ 功能特性
- 7 种合约类型:出售、交付、支付、资源收集、保护、悬赏和服务。
- 基于聊天的引导式创建向导 —— 无需繁琐的表单,只需在聊天中回答几个提示即可。
- 一键接受:可通过游戏内 GUI 或命令完成。
- 自动目标跟踪:
- 出售 / 交付 / 资源收集 → 当所需物品移交时自动完成。
- 悬赏 → 当目标被消灭时自动完成。
- 保护 → 若目标存活至约定时长则自动完成;若目标提前死亡则立即失败。
- 服务 → 通过 API/管理员手动完成,适用于无法自动验证的工作。
- 安全的 Vault 托管资金担保:合约创建时即刻从创建者处扣留奖励资金,仅在完成时释放,或在失败/取消时退款。
- 完整的 GUI 界面:提供可用合约、我的合约、进行中、已完成和已失败列表——支持分页,并可查看每个合约的详细信息。
- 自动过期处理:可配置的周期性任务会自动标记过期的合约为失败状态,并自动退还托管资金。
- 天生防重复设计:具备幂等交易日志、每合约锁定机制,以及针对登出、死亡、重启和崩溃的安全处理。
- SQLite 存储,无需外部数据库。
- 公开开发者 API,提供专用的 Bukkit 事件供其他插件接入。
? 合约类型一览
| 类型 |
验证方式 |
| 出售 |
自动(物品交付) |
| 交付 |
自动(物品交付) |
| 支付 |
半自动(接受时通过 Vault 转账) |
| 资源收集 |
自动(物品交付) |
| 保护 |
自动(周期性任务 + 死亡事件) |
| 悬赏 |
自动(玩家死亡事件) |
| 服务 |
手动(API / 管理员确认) |
?️ 命令
| 命令 |
描述 |
权限 |
/contracts |
打开主菜单 |
contracts.use |
/contracts create <type> |
启动引导式创建向导 |
contracts.create |
/contracts list |
浏览可用合约 |
contracts.use |
/contracts mine |
你创建的合约 |
contracts.use |
/contracts active |
你参与的合约 |
contracts.use |
/contracts completed |
已完成的合约 |
contracts.use |
/contracts failed |
失败/已取消的合约 |
contracts.use |
/contracts accept <id> |
接受一个合约 |
contracts.use |
/contracts cancel <id> |
取消你自己的合约 |
contracts.use |
/contracts info <id> |
查看合约详情 |
contracts.use |
/contractsadmin reload |
重载配置和消息 |
contracts.admin |
/contractsadmin delete <id> |
强制删除合约(自动退还托管资金) |
contracts.admin |
? 权限
contracts.* — 所有权限(默认:op)
contracts.use — 浏览、接受、查看详情、取消自己的合约(默认:true)
contracts.create — 创建新合约(默认:true)
contracts.admin — 管理命令(默认:op)
? 依赖项
- Vault (软依赖) — 仅在有金钱奖励时需要。纯物品合约无需此依赖即可运行。
- 任何兼容 Vault 的经济插件(例如 EssentialsX)用于金钱奖励。
- 无需外部数据库 —— 使用内置的 shaded SQLite 驱动运行。
?️ 开发者 API
Contracts 通过 Bukkit 的 ServicesManager 暴露公开的 ContractsAPI,并提供专用事件(ContractCreateEvent、ContractAcceptEvent、ContractProgressEvent、ContractCompleteEvent、ContractFailEvent、ContractCancelEvent),使其他插件能够以编程方式创建合约、监听状态变化或集成自定义验证系统——非常适合 SERVICE 类型的合约。
⚙️ 配置亮点
- 每位玩家的最大活跃/已接受合约数量(防垃圾信息)
- 合约最短/最长时间
- 每合约最大参与人数
- 过期检查间隔
- 是否允许取消已接受的合约
- 完全可定制、带颜色代码的消息
? 路线图
- PlaceholderAPI 支持
- 按合约类型的独立权限节点
- 面向服务器管理员的 Web 仪表板
A digital contract system between players — sell, deliver, pay, gather resources, protect, hunt bounties, or offer services, all backed by a secure Vault escrow.
Contracts lets players make binding agreements with each other: define an objective and a reward, set a deadline, and let the plugin automatically track progress and pay out. No more "trust me bro" trades.
✨ Features
- 7 contract types: Sale, Delivery, Payment, Resource Gathering, Protection, Bounty, and Service.
- Guided chat-based creation wizard — no clunky forms, just answer a few prompts in chat.
- One-click acceptance from an in-game GUI or via command.
- Automatic objective tracking:
- Sale / Delivery / Resource Gathering → completes when the required items are handed over.
- Bounty → completes when the target is eliminated.
- Protection → completes if the target survives the agreed duration; fails instantly if they die early.
- Service → completed manually via API/admin for work that can't be auto-verified.
- Secure Vault-backed escrow: the reward is withheld from the creator the moment the contract is created, and released only on completion, or refunded on failure/cancellation.
- Full GUI: Available contracts, My contracts, Active, Completed, and Failed — paginated, with a detailed view for each contract.
- Automatic expiration: a configurable periodic task fails expired contracts and refunds the escrow automatically.
- Anti-duplication safe by design: idempotent transaction log, per-contract locking, and safe handling of logout, death, restarts, and crashes.
- SQLite storage, no external database required.
- Public developer API with dedicated Bukkit events for other plugins to hook into.
? Contract types at a glance
| Type |
Verification |
| Sale |
Automatic (item delivery) |
| Delivery |
Automatic (item delivery) |
| Payment |
Semi-automatic (Vault transfer on acceptance) |
| Resource Gathering |
Automatic (item delivery) |
| Protection |
Automatic (periodic task + death event) |
| Bounty |
Automatic (player death event) |
| Service |
Manual (API / admin confirmation) |
?️ Commands
| Command |
Description |
Permission |
/contracts |
Open the main menu |
contracts.use |
/contracts create <type> |
Start the guided creation wizard |
contracts.create |
/contracts list |
Browse available contracts |
contracts.use |
/contracts mine |
Contracts you created |
contracts.use |
/contracts active |
Contracts you're involved in |
contracts.use |
/contracts completed |
Completed contracts |
contracts.use |
/contracts failed |
Failed / cancelled contracts |
contracts.use |
/contracts accept <id> |
Accept a contract |
contracts.use |
/contracts cancel <id> |
Cancel your own contract |
contracts.use |
/contracts info <id> |
View contract details |
contracts.use |
/contractsadmin reload |
Reload config & messages |
contracts.admin |
/contractsadmin delete <id> |
Force-delete a contract (auto-refunds escrow) |
contracts.admin |
? Permissions
contracts.* — all permissions (default: op)
contracts.use — browse, accept, view info, cancel own contracts (default: true)
contracts.create — create new contracts (default: true)
contracts.admin — administrative commands (default: op)
? Dependencies
- Vault (soft-dependency) — required only for money-based rewards. Item-only contracts work without it.
- Any Vault-compatible economy plugin (e.g. EssentialsX) for money rewards.
- No external database — runs on a bundled, shaded SQLite driver.
?️ Developer API
Contracts exposes a public ContractsAPI via Bukkit's ServicesManager, plus dedicated events (ContractCreateEvent, ContractAcceptEvent, ContractProgressEvent, ContractCompleteEvent, ContractFailEvent, ContractCancelEvent) so other plugins can create contracts programmatically, listen for state changes, or integrate custom verification systems — perfect for SERVICE-type contracts.
⚙️ Configuration highlights
- Max active/accepted contracts per player (anti-spam)
- Min/max contract duration
- Max participants per contract
- Expiration check interval
- Whether cancelling an already-accepted contract is allowed
- Fully customizable, colour-coded messages
? Roadmap
- PlaceholderAPI support
- Per-contract-type permission nodes
- Web dashboard for server admins
评论 0
登录后参与评分
还没有评论,来抢沙发吧