变量
安装 PlaceholderAPI 后,星月市集会自动注册下面的变量(不需要 /papi ecloud download)。
开服时控制台会显示「PlaceholderAPI 变量已注册:%starauction_listings% / %starauction_stash% / …」。
一览
| 变量 | 内容 | 例子 |
|---|---|---|
%starauction_listings% | 玩家上架中的商品数(一口价 + 拍卖 + 收购单) | 7 |
%starauction_listings_sell% | 上架中的一口价数 | 4 |
%starauction_listings_auction% | 进行中的拍卖数 | 2 |
%starauction_listings_order% | 进行中的收购单数 | 1 |
%starauction_limit% | 一口价上架上限(含 starauction.limit.<数量>) | 25 |
%starauction_limit_auction% | 拍卖上限 | 6 |
%starauction_limit_order% | 收购单上限 | 10 |
%starauction_stash% | 等着玩家领的东西:星月邮箱里附件还没领的邮件数 + 市集还没寄出的笔数 | 3 |
%starauction_stash_items% | 市集还没寄出的物品件数(所有物品笔数的数量加总;寄出后变回 0) | 0 |
%starauction_stash_money% | 市集还没寄出的款项笔数 | 0 |
%starauction_group% | 所在的权限组名称 | vip |
%starauction_tax% | 一口价交易税(%) | 2 |
%starauction_sold% | 累计卖出几笔(所有货币合计;卖给收购单也算) | 56 |
%starauction_earned_<货币ID>% | 用这种货币累计的税后收入,例如 %starauction_earned_money%、%starauction_earned_points% | 125,300.50 |
%starauction_market% | 全服上架中的商品总数(不需要玩家) | 1024 |
什么时候更新
| 变量 | 来源 |
|---|---|
listings*、market | 直接读取内存中的市集,即时;跨服时在 sync.interval-ms(默认 1 秒)内更新 |
stash* | 「还没寄出」的部分读取快取,有变动(包括别的子服的交易)或寄出时自动重新读取,第一次读取时在背景查询,可能先显示 0;「邮箱待领取」的部分读取星月邮箱的快取 |
limit*、group、tax | 每次即时计算玩家的权限 |
sold、earned_* | 从成交记录统计,快取 60 秒 |
这些变量都不会在主线程查询数据库,放在计分板、TAB 列表里频繁刷新也没有负担。