SxAuctionHouse 允许玩家通过一个干净且完全可配置的图形用户界面(GUI)出售自己物品栏中的物品,并互相购买。它没有自己的经济系统:所有支付均通过 Vault 进行,因此它可以与你服务器已运行的任何经济插件配合使用。
功能
- 支持分页、搜索、分类和排序的市场 GUI
- 使用
/mk sell 500 直接从手中出售物品
- 购买前确认界面,显示价格、卖家以及你购买前后的余额
- 管理和取消你自己的挂牌
- 完整的买卖历史记录
- 自动过期机制:无论卖家是否在线,过期后物品将归还给卖家
- 物品永远不会被销毁。任何无法交付的物品都会进入队列,并在玩家下次登录时移交
- 可配置的市场税费,可选择从流通中移除或支付到服务器账户
- 支持 PlaceholderAPI(可选)
- 每条消息和每个 GUI 元素均可配置,支持 MiniMessage
- SQLite 存储,带有连接池,无需安装或管理
支持的平台
已在以下平台实际启动测试:
- Paper 1.21.x
- Purpur 及其他 Paper 分支
- Spigot 1.21.x
- CraftBukkit 1.21.x
- Folia 1.21.x
单个 JAR 文件会在启动时检测平台并自适应。在 Folia 上,它将使用区域化调度器而非经典调度器。
需要 Java 21 或更高版本。
依赖
- Vault
- 任意兼容 Vault 的经济插件,例如 EssentialsX
- PlaceholderAPI 为可选
如果没有经济插件,模组仍会加载且市场仍可打开,但买卖功能将被禁用,控制台会提示你需要安装的内容。
命令
-
/mk 打开市场
-
/mk sell <price> 列出手中的物品 (简写: s)
-
/mk list 管理你的挂牌 (简写: l)
-
/mk history 查看你的购买和销售记录 (简写: h)
-
/mk claim 领取等待你的物品 (简写: c)
-
/mk help 命令帮助
-
/mka reload 重新加载配置和消息 (简写: r)
-
/mka remove <id> 移除挂牌并将物品归还给卖家
-
/mka info 查看版本、平台、经济和税费状态
也可通过 /ah、/market 和 /auctionhouse 访问。
价格支持简写:5000、5,000 和 5k 表示相同含义,2m 和 3b 同理。
权限
- sxah.use 浏览和购买 默认:所有人
- sxah.sell 创建挂牌 默认:所有人
- sxah.admin 重载、移除任何挂牌 默认:操作员
每个子命令都会检查其自身的权限,因此撤销 sxah.sell 确实能阻止出售行为。
占位符
- %sxah_balance%
- %sxah_active_listings%
- %sxah_sold_items%
- %sxah_total_sales%
- %sxah_pending_returns%
- %sxah_max_listings%
- %sxah_tax_percent%
物品与资金安全
这是在生产服务器上安装前值得阅读的部分。
一个挂牌只能离开“活跃”状态一次。每笔销售、取消和过期都通过一个单一的数据库条件语句处理,该语句只有一个调用者能成功,因此两名玩家同时点击购买只会产生一笔交易,另一人则会收到清晰的“不再可用”提示。这已通过针对真实数据库运行 32 个线程的测试覆盖。
物品永远不会被销毁。每件离开挂牌的物品都会在改变挂牌状态的同一事务中写入交付队列,因此两者绝不会不一致。背包已满、玩家离线或服务器崩溃等情况会将物品暂存,而不会丢失。
购买操作按顺序执行,确保每次失败都有完整的回滚。如果支付失败,挂牌将保持原样重新上架;如果卖家 payout 失败,买家将在同一刻收到退款。挂牌仅在标记为已售的同时,完成账目条目记录和队列物品分配,全部在一个事务中完成。
菜单点击在被菜单解释之前就会被取消,从而关闭了整类复制漏洞——例如 Shift+点击或拖拽导致图标从 GUI 中拉出。除了哪个槽位被按下之外,不信任任何来自点击的信息;价格、卖家和状态始终从数据库中重新读取。
配置
挂牌限制、过期时间、价格范围、税费、分类、音效、GUI 布局和每条消息均可配置。分类通过材质名称、通配符模式或语义规则匹配,因此 Minecraft 更新带来的新物品无需编辑即可自动归类。
支持
发现错误或想要新功能?SUPPORT DISCORD
SxAuctionHouse lets players sell items from their own inventory and buy from
each other through a clean, fully configurable GUI. It has no economy of its
own: every payment goes through Vault, so it works with whatever economy
plugin your server already runs.
Features
Marketplace GUI with pagination, search, categories and sorting
Sell straight from your hand with /mk sell 500
Purchase confirmation showing price, seller and your balance before and after
Manage and cancel your own listings
Full history of what you bought and sold
Automatic expiry that returns the item to the seller, online or not
Items are never destroyed. Anything that cannot be delivered is queued and handed over on the next login
Configurable marketplace tax, either removed from circulation or paid into a server account
PlaceholderAPI support, entirely optional
Every message and every GUI element is configurable, with MiniMessage support
SQLite storage with connection pooling, nothing to install or administer
Supported platforms
Tested by actually booting the plugin on each of these:
- Paper 1.21.x
- Purpur and other Paper forks
- Spigot 1.21.x
- CraftBukkit 1.21.x
- Folia 1.21.x
One jar detects the platform at startup and adapts to it. On Folia it uses the
regionised schedulers instead of the classic one.
Requires Java 21 or newer.
Requirements
Vault
Any Vault-compatible economy plugin, for example EssentialsX
PlaceholderAPI is optional
Without an economy the plugin still loads and the marketplace still opens, but
buying and selling stay disabled and the console explains what to install.
Commands
-
/mk open the marketplace
-
/mk sell <price> list the item in your hand (short: s)
-
/mk list manage your listings (short: l)
-
/mk history your purchases and sales (short: h)
-
/mk claim collect items waiting for you (short: c)
-
/mk help command help
-
/mka reload reload config and messages (short: r)
-
/mka remove <id> remove a listing and return the item to its seller
-
/mka info version, platform, economy and tax status
Also reachable as /ah, /market and /auctionhouse.
Prices accept shorthand: 5000, 5,000 and 5k all mean the same thing, as do
2m and 3b.
Permissions
- sxah.use browse and buy default: everyone
- sxah.sell create listings default: everyone
- sxah.admin reload, remove any listing default: operators
Every subcommand checks its own permission, so revoking sxah.sell genuinely
prevents selling.
Placeholders
- %sxah_balance%
- %sxah_active_listings%
- %sxah_sold_items%
- %sxah_total_sales%
- %sxah_pending_returns%
- %sxah_max_listings%
- %sxah_tax_percent%
Item and money safety
This is the part worth reading before installing on a live server.
A listing can leave the active state exactly once. Every sale, cancellation and
expiry goes through a single conditional database statement that only one
caller can ever win, so two players clicking buy at the same moment produce one
sale and one clear "no longer available" message. This is covered by tests that
run 32 threads against a real database.
Items are never destroyed. Every item that leaves a listing is written to a
delivery queue in the same transaction that changes the listing status, so the
two can never disagree. A full inventory, a logged-out player or a server crash
parks the item instead of losing it.
Purchases are ordered so every failure has a complete undo. If the payment
fails, the listing goes back on the market untouched. If the seller payout
fails, the buyer is refunded in the same tick. A listing is only ever marked
sold together with its ledger entry and its queued item, in one transaction.
Menu clicks are cancelled before the menu interprets them, which closes the
whole class of duplication bugs where a shift-click or a drag pulls an icon out
of a GUI. Nothing from a click is trusted except which slot was pressed; price,
seller and status are always re-read from the database.
Configuration
Listing limits, expiry time, price range, tax, categories, sounds, GUI layout
and every message are configurable. Categories are matched by material name,
wildcard pattern or semantic rule, so new items from a Minecraft update are
categorised without editing anything.
Support
Found a bug or want a feature? SUPPORT DISCORD
评论 0
登录后参与评分
还没有评论,来抢沙发吧