跳至主要内容

ResurrectionChest 設定檔與權限

權限

權限用途預設值
resurrectionchest.*賦予管理員存取 setup、initialize、downloadall、updatecontent 與 reload 指令的權限op
resurrectionchest.setup賦予管理員存取 /resurrectionchest setup 指令的權限op
resurrectionchest.initialize賦予管理員存取 /resurrectionchest initialize 指令的權限op
resurrectionchest.use允許玩家註冊箱子並將死亡掉落物路由到其中true
resurrectionchest.model.free允許玩家使用免費的 FreeMinecraftModels 箱子視覺效果(Wooden Chest)true
resurrectionchest.model.premium允許玩家使用進階的 FreeMinecraftModels 箱子視覺效果(Angelic Chest)op

resurrectionchest.use 是實際箱子行為的關鍵權限。管理員與模型權限分別僅影響指令與可選的視覺效果。

指令

指令權限用途
/resurrectionchestresurrectionchest.*顯示簡短的資訊提示,指向設定流程
/resurrectionchest setupresurrectionchest.setup開啟內容設定選單(瀏覽並切換箱子內容包)
/resurrectionchest initializeresurrectionchest.initialize開啟首次設定選單
/resurrectionchest downloadallresurrectionchest.setup從 Nightbreak 下載所有可用內容包
/resurrectionchest updatecontent(別名 updateallresurrectionchest.setup僅重新下載已過時的已安裝內容包
/resurrectionchest reloadresurrectionchest.*重新載入 ResurrectionChest

設定項

config.yml 目前公開以下面向使用者的設定:

設定鍵類型預設值
setupDonebooleanfalse
Input name for death cheststring[DeathChest]
Enable high compatibility / low security mode for plugin conflictsbooleanfalse
Lower worn armor's durability on deathbooleantrue
Amount of durability to lower on deathint100
Chest creation messagestring&8[ResurrectionChest] &aYou've created your Death Chest!
Chest destruction messagestring&8[ResurrectionChest] &cYour Death Chest has been destroyed!
Chest missing messagestring&8[ResurrectionChest] &4Your Death Chest is missing!
Death messagestring&8[ResurrectionChest] &aYour items have been moved to your Death Chest!
deathChestRemovedMessagestring&8[ResurrectionChest] &cYour Death Chest has been removed!
Enable particle effects for death chestsbooleantrue
Particle effect 1stringENCHANTMENT_TABLE
Particle effect 2stringENCHANTMENT_TABLE
Particle effect 3stringPORTAL
blacklistedWorldslist[none]
storeXPbooleantrue
xpPercentageKeptdouble0.75
deathChestNameTagstring$playerName's &fResurrection Chest
freeSingleDeathChestModelNamestringresurrectionchest_free_single
freeDoubleDeathChestModelNamestringresurrectionchest_free_double
premiumSingleDeathChestModelNamestringresurrectionchest_angelic_single
premiumDoubleDeathChestModelNamestringresurrectionchest_angelic_double

經驗值處理

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 conflicts
  • Lower worn armor's durability on deathAmount of durability to lower on death
  • Particle effect 1
  • Particle effect 2
  • freeDoubleDeathChestModelNamepremiumDoubleDeathChestModelName(插件在內部將模型名稱前綴 resurrectionchest_freeresurrectionchest_angelic 硬編碼,然後根據箱子大小附加 _single_double,因此「Double」設定鍵目前並不會影響箱子視覺效果)

相比之下,Particle effect 3 是目前程式碼中有明顯實際使用的粒子設定(在箱子所在區塊已載入時每 tick 生成)。freeSingleDeathChestModelNamepremiumSingleDeathChestModelName 則用於在指派進階前綴前驗證模型檔案是否存在。