跳到主要内容

ResurrectionChest 配置和权限

权限

权限用途默认值
resurrectionchest.*授予管理员访问 setup、content、update、reload 和 clear 命令的权限op
resurrectionchest.setup授予管理员访问 /resurrectionchest setuprecommendedpluginsdownloadallcontentupdatecontent 的权限op
resurrectionchest.initialize为首次设置流程保留的管理员权限op
resurrectionchest.use允许玩家注册箱子并将死亡掉落物路由到其中true
resurrectionchest.model.free允许玩家使用免费的 FreeMinecraftModels 箱子视觉效果(木质箱子)true
resurrectionchest.model.premium允许玩家使用高级的 FreeMinecraftModels 箱子视觉效果(神圣箱子)op

resurrectionchest.use 是实际箱子行为的重要权限。管理员权限和模型权限分别只影响命令和可选的视觉效果。

命令

命令权限用途
/resurrectionchestresurrectionchest.*打印一段简短的信息,指向设置流程
/resurrectionchest setupresurrectionchest.setup打开设置菜单(浏览并切换箱子内容包、检查插件更新、查看推荐插件、切换自动更新)
/resurrectionchest recommendedpluginsresurrectionchest.setup打开(或在控制台中列出)ResurrectionChest 推荐的配套插件
/resurrectionchest downloadallresurrectionchest.*从 Nightbreak 下载插件更新(如果有)以及所有可用的内容包
/resurrectionchest downloadallcontentresurrectionchest.setup从 Nightbreak 下载所有可用的内容包
/resurrectionchest updatecontent(别名 updateallcontentresurrectionchest.setup仅重新下载已安装的过时内容包
/resurrectionchest downloadpluginupdateresurrectionchest.*如果有可用的 ResurrectionChest 插件更新,则下载它
/resurrectionchest reloadresurrectionchest.*重新加载 ResurrectionChest
/resurrectionchest clearresurrectionchest.*清除所有被跟踪的 ResurrectionChest 方块;掉落每个被跟踪箱子的库存内容,并移除箱子和告示牌方块

下载的插件更新会被放入服务器的 update 文件夹,并仅在下次服务器重启后生效。

配置项

config.yml 当前公开以下面向用户的设置:

配置键类型默认值
setupDonebooleanfalse
nightbreak.autoDownloadPluginUpdatesbooleanfalse
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

插件和内容自动更新

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 并且 高级模型实际已加载时,优先使用高级视觉效果(神圣箱子)
  • 否则,当玩家拥有 resurrectionchest.model.free 时,使用免费视觉效果(木质箱子)
  • 如果两个权限都无法提供可用的模型,则不生成模型,原样使用原版箱子
  • 视觉模型根据箱子大小在单箱和双箱变体之间切换
  • 真实箱子仍然是存储后端

当自定义箱子模型处于活动状态时,玩家可以直接与其交互:

  • 右键单击模型以打开底层箱子库存
  • 潜行 + 左键单击模型以移除注册(只有拥有者可以这样做)
  • 不潜行的左键单击会显示黄色警告,而不是销毁箱子

如果 FreeMinecraftModels 缺失或模型无法生成,底层箱子仍然正常工作。

内容包

ResurrectionChest 附带两个内容包,封装了 FreeMinecraftModels 的箱子模型:

  • 木质箱子(免费):提供 resurrectionchest_free_single / resurrectionchest_free_double。由 resurrectionchest.model.free 使用。
  • 神圣箱子(高级):提供 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
  • freeSingleDeathChestModelName
  • freeDoubleDeathChestModelNamepremiumDoubleDeathChestModelName(插件内部硬编码了模型名称前缀 resurrectionchest_freeresurrectionchest_angelic,然后根据箱子大小附加 _single_double,因此 "Double" 配置键目前不会影响箱子视觉效果)

相比之下,Particle effect 3 是在当前代码中有明显活跃使用的粒子设置(在箱子所在区块已加载时每 tick 生成)。premiumSingleDeathChestModelName 用于在分配高级前缀之前验证高级模型文件是否存在;免费模型文件的存在性不会单独检查。