跳到主要内容

Auction

Auction 是 MatrixShop 里配置最复杂的模块之一。它不仅决定拍卖入口长什么样,还控制英式拍卖、荷式拍卖、押金、税率、抢拍保护、记录写入,以及拍卖使用的货币来源。

默认文件

  • Auction/settings.yml
  • Auction/shops/default.yml
  • Auction/ui/auction.yml
  • Auction/ui/upload.yml
  • Auction/ui/detail.yml
  • Auction/ui/manage.yml
  • Auction/ui/bids.yml
  • Auction/ui/bid.yml

Auction/settings.yml

Enabled: true

Bindings:
Commands:
Bindings:
- 'auction'
- 'ah'
Register: true
Show-In-Help: true
Priority: 20
Condition: 'perm matrixshop.auction.use'

Options:
Currency:
Key: vault
Listing:
Max-Active: 20
Duration:
Default: 86400
Min: 600
Max: 604800
Modes:
ENGLISH:
Enabled: true
Allow-Buyout: true
Min-Start-Price: 100
Min-Step:
Mode: percent
Fixed: 100
Percent: 5
DUTCH:
Enabled: true
Min-Start-Price: 100
End-Price-Min: 1
Tick-Seconds: 60
Deposit:
Enabled: true
Mode: percent
Value: 5
Refund-On-Sell: true
Refund-On-Cancel: false
Tax:
Enabled: true
Mode: percent
Value: 3
Rules:
vip:
Enabled: true
Priority: 100
Mode: percent
Value: 1
Condition:
- "perm 'group.vip'"
Snipe-Protection:
Enabled: true
Trigger-Seconds: 30
Extend-Seconds: 30
Max-Extend-Times: 5
Cancel:
Owner:
Allow: true
Deny-If-Has-Bid: true
Record:
Write-On-Create: true
Write-On-Bid: false
Write-On-Complete: true
Write-On-Cancel: true

模块级字段

字段说明
Enabled是否启用拍卖行。
Bindings.Commands.Bindings拍卖命令别名,默认包括 auctionah
Register这里直接是 true,所以会注册独立拍卖命令。
Priority由于 ah 很容易和别的插件冲突,这个优先级非常重要。
Condition默认权限节点。
Options.Currency.Key模块级默认货币 key。

Options.Listing

字段说明
Max-Active每个玩家最多同时保持多少个拍卖。
Duration.Default默认拍卖时长,单位是秒。
Duration.Min允许创建的最短时长。
Duration.Max允许创建的最长时长。

Options.Listing.Modes.ENGLISH

字段说明
Enabled是否启用英式拍卖。
Allow-Buyout英式拍卖是否允许一口价。
Min-Start-Price起拍价最小值。
Min-Step.Mode加价步长模式,示例是 percent
Min-Step.Fixed固定步长值,只有在 Mode: fixed 时更直观。
Min-Step.Percent百分比步长。

Options.Listing.Modes.DUTCH

字段说明
Enabled是否启用荷式拍卖。
Min-Start-Price荷拍起始价下限。
End-Price-Min最低结束价。
Tick-Seconds荷拍价格下降间隔,单位秒。

押金、税率、保护和记录

字段说明
Deposit.Enabled是否启用押金。
Deposit.Mode押金计算方式,示例是百分比。
Deposit.Value押金值。
Deposit.Refund-On-Sell成交后是否返还押金。
Deposit.Refund-On-Cancel取消后是否返还押金。
Tax.Enabled是否启用交易税。
Tax.Mode税率模式。
Tax.Value税值。
Tax.Rules.*条件税规则,命中后覆盖默认税配置。
Snipe-Protection.Enabled是否启用尾秒保护。
Trigger-Seconds剩余时间少于多少秒时触发保护。
Extend-Seconds每次触发后延长多少秒。
Max-Extend-Times最多延长几次。
Cancel.Owner.Allow是否允许卖家自己取消。
Cancel.Owner.Deny-If-Has-Bid已有人出价时是否禁止取消。
Record.Write-On-*各类行为是否写入记录系统。

Tax.Rules.* 当前支持:

  • Enabled
  • Priority
  • Mode
  • Value
  • Condition

Auction/shops/default.yml

Bindings:
Commands:
Bindings:
- 'auction'
- 'ah'
Register: true
Show-In-Help: true
Priority: 100

Currency:
Key: vault

Title:
- '&8Auction Hall &7{page}/{max-page}'

layout:
- '#########'
- '#ggggggg#'
- '#ggggggg#'
- '#ggggggg#'
- '##U#B#M##'
- 'P###R###N'

icons:
'#':
material: 'STAINED_GLASS_PANE'
name: ' '
'g':
material: 'AIR'
mode: 'goods'
'U':
material: 'CHEST'
name: '&aUpload'
lore:
- '&7Open upload instructions'
'B':
material: 'GOLD_INGOT'
name: '&6My Bids'
lore:
- '&7View auctions you have bid on'
'M':
material: 'BOOK'
name: '&fMy Auctions'
lore:
- '&7Manage your active listings'
'R':
material: 'BARRIER'
name: '&cClose'
actions:
left:
- 'close'
'P':
material: 'ARROW'
name: '&aPrevious'
'N':
material: 'ARROW'
name: '&aNext'

字段解释:

字段说明
Bindings.Commands入口页再次声明拍卖命令。
Title带页码的拍卖大厅标题。
layout三行拍卖列表 + 一行功能按钮。
icons.g动态拍卖条目。
icons.U上传或上架入口。
icons.B查看自己的出价记录。
icons.M查看自己当前的拍卖。
icons.P/N翻页。
icons.R关闭页面。

当前货币优先级

Auction 当前采用:

  1. Auction/shops/*.yml -> Currency.Key
  2. Auction/settings.yml -> Options.Currency.Key
  3. 默认回退 vault

使用建议

  • 想限制玩家同时挂拍数量:改 Options.Listing.Max-Active
  • 想关掉一口价:改 Options.Listing.Modes.ENGLISH.Allow-Buyout
  • 想让尾秒更刺激:调 Snipe-Protection.Trigger-SecondsExtend-Seconds
  • 想减少账本写入:把 Record.Write-On-* 改成更保守的组合。