ResurrectionChest 設定檔與權限
權限
| 權限 | 用途 | 預設值 |
|---|---|---|
resurrectionchest.* | 賦予管理員存取 setup、content、update、reload 與 clear 指令的權限 | op |
resurrectionchest.setup | 賦予管理員存取 /resurrectionchest setup、recommendedplugins、downloadallcontent 與 updatecontent 的權限 | op |
resurrectionchest.initialize | 保留給首次設定流程使用的管理員權限 | op |
resurrectionchest.use | 允許玩家註冊箱子並將死亡掉落物路由到其中 | true |
resurrectionchest.model.free | 允許玩家使用免費的 FreeMinecraftModels 箱子視覺效果(Wooden Chest) | true |
resurrectionchest.model.premium | 允許玩家使用進階的 FreeMinecraftModels 箱子視覺效果(Angelic Chest) | op |
resurrectionchest.use 是實際箱子行為的關鍵權限。管理員與模型權限分別僅影響指令與可選的視覺效果。
指令
| 指令 | 權限 | 用途 |
|---|---|---|
/resurrectionchest | resurrectionchest.* | 顯示簡短的資訊提示,指向設定流程 |
/resurrectionchest setup | resurrectionchest.setup | 開啟設定選單(瀏覽並切換箱子內容包、檢查插件更新、查看推薦插件、切換自動更新) |
/resurrectionchest recommendedplugins | resurrectionchest.setup | 開啟(在主控台則列出)ResurrectionChest 推薦的搭配插件 |
/resurrectionchest downloadall | resurrectionchest.* | 從 Nightbreak 下載插件更新(如有)以及每個可用的內容包 |
/resurrectionchest downloadallcontent | resurrectionchest.setup | 從 Nightbreak 下載每個可用的內容包 |
/resurrectionchest updatecontent(別名 updateallcontent) | resurrectionchest.setup | 僅重新下載已過時的已安裝內容包 |
/resurrectionchest downloadpluginupdate | resurrectionchest.* | 若有可用的 ResurrectionChest 插件更新則下載之 |
/resurrectionchest reload | resurrectionchest.* | 重新載入 ResurrectionChest |
/resurrectionchest clear | resurrectionchest.* | 清除每個被追蹤的 ResurrectionChest 方塊;掉落每個被追蹤箱子的物品欄內容,並移除箱子與告示牌方塊 |
已下載的插件更新會放置在伺服器的更新資料夾中,且僅在下次伺服器重啟後才會生效。
設定項
config.yml 目前公開以下面向使用者的設定:
| 設定鍵 | 類型 | 預設值 |
|---|---|---|
setupDone | boolean | false |
nightbreak.autoDownloadPluginUpdates | boolean | false |
Input name for death chest | string | [DeathChest] |
Enable high compatibility / low security mode for plugin conflicts | boolean | false |
Lower worn armor's durability on death | boolean | true |
Amount of durability to lower on death | int | 100 |
Chest creation message | string | &8[ResurrectionChest] &aYou've created your Death Chest! |
Chest destruction message | string | &8[ResurrectionChest] &cYour Death Chest has been destroyed! |
Chest missing message | string | &8[ResurrectionChest] &4Your Death Chest is missing! |
Death message | string | &8[ResurrectionChest] &aYour items have been moved to your Death Chest! |
deathChestRemovedMessage | string | &8[ResurrectionChest] &cYour Death Chest has been removed! |
Enable particle effects for death chests | boolean | true |
Particle effect 1 | string | ENCHANTMENT_TABLE |
Particle effect 2 | string | ENCHANTMENT_TABLE |
Particle effect 3 | string | PORTAL |
blacklistedWorlds | list | [none] |
storeXP | boolean | true |
xpPercentageKept | double | 0.75 |
deathChestNameTag | string | $playerName's &fResurrection Chest |
freeSingleDeathChestModelName | string | resurrectionchest_free_single |
freeDoubleDeathChestModelName | string | resurrectionchest_free_double |
premiumSingleDeathChestModelName | string | resurrectionchest_angelic_single |
premiumDoubleDeathChestModelName | string | resurrectionchest_angelic_double |
自動插件與內容更新
nightbreak.autoDownloadPluginUpdates 是隨 ResurrectionChest 一同提供的共用 Nightbreak/MagmaCore 設定。其預設值為 false。
- 當設為
false(預設)時,不會自動下載任何東西。ResurrectionChest 仍會在啟動時(以及大約每小時一次)檢查插件更新,以便遊戲內的更新按鈕能夠顯示結果,但任何實際下載都需要由您自行觸發。 - 當設為
true時,ResurrectionChest 會在啟動時下載可用的插件更新以及已過時的內容包。已下載的插件與內容更新僅在伺服器重啟後才會被使用。 - 自動插件下載需要有效的 Nightbreak 帳戶權杖以及有效的支持者會員資格。
您可以在遊戲內透過 /resurrectionchest setup 中的 Automatic Updates 工具列切換按鈕來變更此設定,或直接編輯 config.yml。
設定選單也提供 Plugin Update 條目(顯示已安裝/可用的版本,並在點擊時下載更新)以及 Recommended Plugins 條目(與 /resurrectionchest recommendedplugins 相同的清單)。
經驗值處理
當 storeXP 啟用時:
- ResurrectionChest 在遊戲過程中追蹤玩家目前的總經驗值
- 死亡時,儲存
追蹤的總經驗值 * xpPercentageKept - 將掉落的經驗值設定為
0 - 當擁有者下次打開註冊箱子時,歸還儲存的經驗值
重要例外:
- 如果
keepInventory處於啟用狀態,ResurrectionChest 不會做任何事。 - 如果
keepLevel處於啟用狀態,經驗值儲存分支會提前退出,並保持原版等級處理不變。
溢出處理
如果箱子沒有空閒槽位可放置物品:
- 該物品會留在正常的死亡掉落清單中
- 玩家會收到箱子已滿的警告
FreeMinecraftModels 整合
如果安裝了 FreeMinecraftModels,ResurrectionChest 可以在真實箱子上方生成視覺箱子模型。
目前行為:
- 當玩家擁有
resurrectionchest.model.premium且進階模型確實已載入時,優先使用進階視覺效果(Angelic Chest) - 否則,當玩家擁有
resurrectionchest.model.free時,使用免費視覺效果(Wooden Chest) - 如果兩個權限皆未提供可用的模型,則不會生成模型,並按原樣使用原版箱子
- 視覺模型會根據箱子大小在單箱和雙箱變體之間切換
- 真實箱子仍然是儲存後端
當自訂模型處於啟用狀態時,玩家可以直接與其互動:
- 右鍵點擊模型可開啟底層箱子的物品欄
- 潛行 + 左鍵點擊模型可銷毀註冊(僅限擁有者可以這麼做)
- 不潛行的左鍵點擊會顯示黃色警告,而不會銷毀箱子
如果 FreeMinecraftModels 缺失或模型無法生成,底層箱子仍可正常運作。
內容包
ResurrectionChest 附帶兩個包裝了 FreeMinecraftModels 箱子模型的內容包:
- Wooden Chest(免費):提供
resurrectionchest_free_single/resurrectionchest_free_double。由resurrectionchest.model.free使用。 - Angelic Chest(進階):提供
resurrectionchest_angelic_single/resurrectionchest_angelic_double。由resurrectionchest.model.premium使用。
每個內容包安裝時位於 FreeMinecraftModels 的 models 資料夾下,解除安裝時則位於 models_disabled。透過 /resurrectionchest setup 切換它們會在這些資料夾之間移動檔案,並自動重新載入 FreeMinecraftModels。
基於原始碼的注意事項
目前原始碼顯示有幾項設定條目雖然在 config.yml 中公開,但在 DefaultConfig 以外的地方並未被引用:
Enable high compatibility / low security mode for plugin conflictsLower worn armor's durability on death與Amount of durability to lower on deathParticle effect 1Particle effect 2freeSingleDeathChestModelNamefreeDoubleDeathChestModelName與premiumDoubleDeathChestModelName(插件在內部將模型名稱前綴resurrectionchest_free與resurrectionchest_angelic硬編碼,然後根據箱子大小附加_single或_double,因此「Double」設定鍵目前並不會影響箱子視覺效果)
相比之下,Particle effect 3 是目前程式碼中有明顯實際使用的粒子設定(在箱子所在區塊已載入時每 tick 生成)。premiumSingleDeathChestModelName 則用於在指派進階前綴前驗證進階模型檔案是否存在;免費模型檔案的存在與否並未另外檢查。