Repository navigation
Do not downgrade to 2.0.0 after any page has used a sixth content row. 2.0.0 shows and saves only slots
0–44 of a page, so items in slots 45–53 (the sixth row, content_rows: 6, or a page that retained six rows
after shrinking) would not be shown there, and the next save from 2.0.0 drops them. Before rolling back, empty
the sixth row of every page (or set content_rows to 5 or less and empty each page's extra rows) on this version.
使用过第 6 行储物后不要降级到 2.0.0。 2.0.0 只显示并保存每页的 0–44 号槽位,第 6 行(content_rows: 6,或缩容后保留了
6 行的页面)中 45–53 号槽位的物品在 2.0.0 中不会显示,并会在 2.0.0 的下一次保存时丢失。回退前,请先在本版本中清空每页的第 6 行
(或把 content_rows 设为 5 及以下,并清空各页保留的额外行)。
Added
- Bag page capacity is configurable with the new
content_rowssetting inconfig/remotebag.yml: 1–6 rows of
nine slots (9–54 slots), default 5 (45 slots, unchanged behaviour). Below five rows the window is smaller; at six
rows the page has two content screens inside the same window, switched with Previous/Next content screen on
toolbar columns 1 and 7. Switching keeps unsaved edits and the edit claim; Save, close,/bag save, quit and
module disable save the whole page. Shrinking never drops items: a page keeps every occupied whole row (a yellow
line says so) until those rows are emptied and the page is reopened, and the main menu'sSlots Usedshows the
real capacity. Slots 45–53 that older versions stored but never showed now appear on the second screen. A value
outside 1–6 refuses the module with a validation error; the operator's file is never rewritten. The removed
rows_per_pagekey stays ignored. Reload affects newly opened windows only (#38). - With
require_manual_save: true(#37), the unsaved-change check covers every content
screen of the page, so a change on a screen not currently shown still refuses the close; switching screens is
not leaving the page and is never refused (#38). - 背包页容量可配置:
config/remotebag.yml新增content_rows,1–6 行、每行 9 格(9–54 格),默认 5 行(45 格,行为不变)。
少于 5 行时窗口变小;6 行时同一窗口内有两个内容屏,用工具栏第 2、8 格的「上一屏/下一屏」切换,切换保留未保存的改动与编辑占用;
保存、关闭、/bag save、退出和模块停用都保存整页。缩容不会丢物品:页面保留所有有物品的整行(聊天中黄色提示说明),清空这些行并重新
打开后才缩容;主页「已用槽位」显示实际容量。旧版本存下却从未显示的 45–53 号槽位现在出现在第二屏。超出 1–6 的值会以校验错误拒绝加载
模块,不会改写服主的配置文件。已移除的rows_per_page仍被忽略。重载只影响之后新打开的窗口(#38)。 - 启用
require_manual_save: true(#37)时,未保存改动的检查覆盖该页的所有内容屏:当前未显示的屏上有改动,
关闭同样会被拒绝;在页内切换内容屏不算离开页面,不会被拒绝(#38)。 - Opt-in manual saving with the new
require_manual_savesetting inconfig/remotebag.yml(defaultfalse,
unchanged behaviour). When it istrue, closing or leaving a page with unsaved changes is refused: the window
reopens on the next tick with "Save this page before closing or leaving it", and the claim is kept. Save (or
/bag savefor your own bag) saves it. Quit and module stop still save for safety; if the window cannot reopen,
its changes are saved instead. The removedsave_on_closekey stays ignored (#37). - Start-up check for older servers. On a server below Minecraft 1.21 the module now refuses to start unless
UltiTools is 6.4.0 or later, and logs an error naming both versions ("UltiRemoteBag needs UltiTools 6.4.0 or later
on Minecraft versions below 1.21"). If either version cannot be read, it logs a warning and starts. On Minecraft
1.21 and later nothing changes (UltiKits/UltiTools-Reborn#655). - 可选的手动保存:
config/remotebag.yml新增require_manual_save(默认false,行为不变)。设为true时,关闭或离开有未保存改动的页面
会被拒绝:窗口在下一刻重新打开并提示先保存,编辑占用保留;点击「保存」(或对自己的背包使用/bag save)即可保存。退出和模块停止仍会为安全
而保存;窗口无法重新打开时改为保存其改动。已移除的save_on_close仍被忽略(#37)。 - 低版本服务器的启动检查:在低于 Minecraft 1.21 的服务器上,除非 UltiTools 为 6.4.0 或更高版本,本模块现在会拒绝启动,并在控制台记录写明
两个版本号的错误;任一版本号无法解析时只记录警告并继续启动。Minecraft 1.21 及以上不受影响(UltiKits/UltiTools-Reborn#655)。
Changed
- For plugin authors:
RemoteBagService#readPage(UUID, int)now gives up after a bounded wait (at most about
two seconds, or a sixth oflock.timeout_secondsif that is shorter) and throws
java.util.concurrent.CompletionExceptionwhen the storage read fails or times out. A failed read is never
returned as an empty page; catch the exception and retry later instead of treating the page as empty
(#57, #82). - 面向插件作者:
RemoteBagService#readPage(UUID, int)现在最多等待一段有限时间(约两秒,若lock.timeout_seconds的六分之一更短则取其值),
存储读取失败或超时时抛出java.util.concurrent.CompletionException。读取失败绝不会以空页返回;请捕获该异常并稍后重试,
不要把页面当作空页处理(#57、#82)。 - For plugin authors:
RemoteBagService#purchasePage(Player)returns aPurchaseResult(CREATED,NOT_CREATED,REFUNDED,
REFUND_FAILED);purchaseBag(Player)is unchanged and returnstrueonly forCREATED. - 面向插件作者:
RemoteBagService#purchasePage(Player)返回PurchaseResult(CREATED、NOT_CREATED、REFUNDED、
REFUND_FAILED);purchaseBag(Player)不变,只在CREATED时返回true。 - The project now ships an MIT
LICENSEfile and declares the licence in its POM (#79). - 项目现在附带 MIT
LICENSE文件,并在 POM 中声明该许可证(#79)。 - README clarifications: page saving and upgrade notes, the cross-server purchase race, editing the official
language files, and the manual-save limitation (#68, #55, #53, #83). - README 补充说明:页面保存与升级注意事项、跨服务器购买竞争、修改官方语言文件,以及手动保存的限制
(#68、#55、#53、#83)。
Fixed
- A page whose contents cannot be read is no longer opened. Reading a content page on open or Refresh waits at
most a sixth oflock.timeout_seconds(at most two seconds). An open that times out is refused with "The bag could
not be loaded. Please try again later." and releases the claim it took; a Refresh that times out keeps the shown
items, turns the window read-only and writes nothing back. Module stop now waits (bounded) for outstanding claim
releases, and the display cache is safe across threads (#57). - 内容页读取失败时不再打开。打开或刷新内容页时最多等待
lock.timeout_seconds的六分之一(上限两秒);打开超时会被拒绝,提示「背包加载失败,
请稍后重试。」,并释放本次取得的占用;刷新超时保留当前显示的物品、窗口变为只读且不回写。模块停止时会在有限时间内等待尚未完成的占用释放,
显示缓存在多线程下安全(#57)。 - A page purchase that loses a creation race is refunded. When another server sharing the database creates the
same player's next page between the purchase's read and its insert, the purchase now gives the price back with one
deposit, tells the player (yellow) and logs a warning. If the economy plugin refuses or fails the refund it is not
retried: the player is told to contact an administrator and the console logs an error naming the player, page and
amount (#81). - 购买背包页时若另一台共用数据库的服务器抢先创建了同一页,现在会以一次存款退还已扣的钱、提示玩家(黄色)并在控制台记录警告。
经济插件拒绝或退款出错时不会重试:提示玩家联系管理员,并在控制台记录写明玩家、页码和金额的错误(#81)。 - A failed redraw no longer claims the contents are unchanged. A redraw after a refused save, lost edit rights or
a settled kept write that times out now says the view could not be redrawn and may not match what is stored; the
Refresh button keeps its own message (#82). - 拒绝保存、失去编辑权或保留的写入落定后的界面重绘读取超时时,不再声称“内容未改变”,而是提示界面未能重新绘制、可能与已保存的
不一致;“刷新”按钮仍使用原提示(#82)。