Skip to content

UltiTrade 2.1.0

Latest

Choose a tag to compare

@wisdommen wisdommen released this 09 Nov 04:50
f8ce74f

Added

  • Optional fixed lifetime for an open trade window: window-timeout in config/trade.yml (seconds,
    0–600, shipped 0 = unlimited). Both players are told the duration when the windows open and warned
    once in the last ten seconds; at expiry the trade is cancelled through the normal cancel path, so each
    player's items come back (an unavailable player's are kept as a pending return) and no money or
    experience moves. A reload applies the new value to newly opened trades only. The legacy
    trade-timeout key stays ignored (#41).

  • 新增可选的交易窗口固定时限:config/trade.yml 中的 window-timeout(秒,0–600,默认 0 不限时)。开窗时双方获知时长,
    最后十秒提醒一次;到期按正常取消流程取消,各自物品退回(无法找到的玩家沿用待返还机制),金币与经验不变。
    重载只影响之后新开的交易;旧键 trade-timeout 仍被忽略(#41)。

  • Optional server-name in config/trade.yml (shipped empty): the name this server writes into new
    pending-return claims, shown in /trade pending list as <server-name>@<bind IP>:<port>. Empty keeps the
    server folder's name as before; the value is trimmed and at most 64 characters are used. Useful when several
    servers share one database and run from folders with the same name (#95).

  • config/trade.yml 新增可选的 server-name(默认留空):本服写入新待返还占用记录的名称,在 /trade pending list 中显示为
    <server-name>@<绑定 IP>:<端口>。留空则与以前一样使用服务器文件夹名;取值会去掉首尾空格,最多使用 64 个字符。适用于多台服务器共用一个
    数据库且文件夹名相同的情况(#95)。

  • On Minecraft versions below 1.21, the module now refuses to enable on UltiTools older than 6.4.0 and
    logs one error naming the server and UltiTools versions ("UltiTrade needs UltiTools 6.4.0 or later on
    Minecraft versions below 1.21 …"); the UltiTools core plugin keeps running. On 1.21 and later nothing
    changes, and UltiTools 6.3.0 or later is still enough. If either version cannot be read, the module logs
    a warning and starts without the check (#93, UltiKits/UltiTools-Reborn#655).

  • 在 Minecraft 1.21 以下版本上,若 UltiTools 低于 6.4.0,本模块会拒绝启用,并记录一条写明服务器与 UltiTools 版本的错误
    (「UltiTrade needs UltiTools 6.4.0 or later on Minecraft versions below 1.21 …」);UltiTools 核心插件照常运行。
    1.21 及以上版本不受影响,仍只需 UltiTools 6.3.0 或更高版本。无法解析任一版本时记录一条警告,不做该检查直接启动
    (#93、UltiKits/UltiTools-Reborn#655)。

  • The module JAR now carries MIT licence metadata and a LICENSE file (#91).

  • 模块新增 MIT 许可证元数据与 LICENSE 文件(#91)。

Changed

  • When a trade is cancelled while the partner is offline and their real last location cannot be read
    (including servers without an offline-location API), the partner's stake now goes to the player who
    started the trade. Before, it was always saved for the offline partner, and if that save failed it was
    dropped at the first world's spawn. An online initiator receives it in the inventory (overflow drops at
    their feet) and is told so; an offline initiator gets it saved as a pending return under their UUID,
    delivered at their next join and kept across a normal restart. Items that do not fit at a join now stay
    saved for a later join instead of dropping. If the offline owner's real location is known, their stake is
    still saved for them, and a failed save drops it at that real location; the world spawn is no longer used
    as a stand-in (#92, UltiKits/UltiTools-Reborn#655).
  • 交易取消时若对方离线且无法读取其真实离线位置(包括没有离线位置 API 的服务器),对方的押物改为返还给发起交易的玩家。
    以前一律为离线方保存,保存失败时掉落在第一个世界的出生点。发起人在线时放入背包(放不下的掉在其脚下)并收到提示;
    发起人离线时按其 UUID 存为待返还记录,下次进服时发还,正常停服重启不会丢失。进服时装不下的部分现在继续保存,等下次进服再领,
    不再掉在地上。若能取得离线物主的真实位置,仍为其保存,保存失败时掉落在该真实位置;不再以世界出生点代替
    (#92、UltiKits/UltiTools-Reborn#655)。
  • /trade block, /trade unblock and trade requests (including shift+right-click) now share one wait
    allowance of about 50 ms across all their settings-lock attempts, instead of waiting up to 50 ms again at
    each check (#68).
  • /trade block、/trade unblock 与交易请求(包括 Shift+右键)现在在全部设置锁尝试中共用约 50 毫秒的等待额度,
    不再在每次检查时各等最多 50 毫秒(#68)。

Fixed

  • Typing a fractional experience amount (such as 1.5) or one above 2,147,483,647 in the trade window's
    chat prompt is now refused with "Invalid amount!" and leaves both offers and both confirmations unchanged,
    also after experience trading has been disabled by a reload. A whole-number decimal such as 1.0 is
    accepted (#67).
  • 在交易窗口的聊天输入中填写带小数的经验数量(如 1.5)或超过 2,147,483,647 的数量,现在会以「Invalid amount!」拒绝,
    双方报价与确认状态均不改变,经验交易被重载关闭后同样如此。1.0 这类整数值的小数写法仍可接受(#67)。
  • The console warning for a saved trade stake that an operator resolved while it was being handed over now
    ends by telling the operator to check the player for a duplicate of those items before their next join, as
    the README already advised (#95).
  • 交易物品在发还过程中被服主处理时的控制台警告,现在会在结尾提示服主在玩家下次进服前检查其是否持有这些物品的重复副本,
    与 README 的建议一致(#95)。
  • Failed cleanup of an empty pending-return row now says it lists no items and removal will be retried
    at a later join, rather than incorrectly sending operators to the held-return list. Confirmation
    failures still report a held row. New claim labels include the server folder name before the bind
    address and port, helping distinguish backends that use the same socket; the label is not a unique
    server ID and falls back to the address alone if the folder cannot be resolved (#62).
  • 空的待返还条目删除失败时,现在会提示其不含物品、将在玩家下次进服时重试删除,不再误报暂扣。确认失败仍会提示暂扣。
    新占用标签会在绑定地址与端口前附上服务器目录名,以帮助区分使用相同地址的后端;此标签不保证唯一,无法解析目录时仅保留地址(#62)。

Documentation

  • Clarified the coordinated-upgrade requirement: a pre-#55 server beside an upgraded one erases a held
    return's recovery record, not redelivers it. Documented why operators must interrupt hand-overs and
    check the claiming server's saved player data before resolving held rows, and kept the accepted JSON
    flush crash window explicit in the README (#62).
  • 明确混用旧版与升级版会抹去暂扣恢复记录,而非重复发还;说明处理暂扣前应停止发还并核对占用服务器上保存的玩家数据,
    同时在 README 中明确已有的 JSON 写盘崩溃窗口限制(#62)。
  • Documented the settings-lock allowance limits (not a database timeout; statistics skipped in a
    disabled-core fallback; another plugin interrupting the server thread), that an already-open window's title
    does not refresh on Minecraft 1.19.2–1.19.3, and aligned partial-reload reporting with UltiTools 6.3.2
    (#68, #92, #94).
  • 补充说明设置锁等待额度的限制(不是数据库超时;核心停用回退时统计可能被跳过;其他插件中断服务器线程)、
    Minecraft 1.19.2–1.19.3 上已打开窗口标题不会即时刷新,并使部分重载的说明与 UltiTools 6.3.2 一致
    (#68、#92、#94)。