EternalDeathDrops – 备份与永恒死亡掉落
EternalDeathDrops 是一款轻量级、性能优化的插件,为服务器管理员提供了两个核心功能:
- 自动世界备份 – 使用自定义分类和保留策略创建世界的定时备份。
- 永恒死亡掉落 – 死亡时掉落的物品永不消失(或具有可配置的生命周期),确保没有任何战利品丢失。
✨ 功能特性
-
灵活的备份系统
- 内置分类:
startup(启动)、hourly(每小时)、manual(手动)
- 完全自定义的分类,拥有独立的间隔时间、文件夹名称和最大备份数量
- 可配置的世界列表 – 仅备份你指定的世界
- 智能保存等待算法(监控
.mca 和 .dat 文件),支持可调节的稳定性和超时检查
- 异步 ZIP 压缩,级别可调(0–9)
- 自动清理旧备份
-
永恒死亡掉落
- 玩家掉落的物品被标记为“永恒” – 它们永远不会消失(或在可配置的时间后消失,单位为刻)
- 跨服务器重启的持久元数据 – 物品会保留其生命周期计数器
- 完整支持物品拾取 – 拾取时移除元数据,物品恢复为正常行为
- 完全可自定义,包含众多功能!
-
性能优先
- 所有重型操作(创建备份、删除旧备份)均在异步线程中运行
ChunkLoadEvent 仅处理加载区块中的物品,而非整个世界
- 对 MSPT 的影响极小 – 测试场景为 150 名玩家同时死亡且背包满载 – 在正常区块加载期间,MSPT 仅增加约 14%(从 ~7.X ms 增至 8.0 ms),而在加载包含数千个物品的区块时,MSPT 最高增加 30 ms(这会导致客户端 FPS 从 120 降至 1 以下)。
-
全量可配置性
- 所有功能均可通过
config.yml 启用/禁用
- 设置你自己的世界文件夹、物品存活刻数、备份间隔、保留限制和压缩级别
? 命令
| 命令 |
描述 |
权限节点 |
/backup |
创建所有世界的手动备份 |
eternaldeathdrops.backup |
/cleareternaldrops |
从服务器中移除所有永恒死亡掉落物品 |
eternaldeathdrops.clear |
/eternaldeathdrops reload |
从磁盘重新加载插件配置 |
eternaldeathdrops.reload |
默认情况下,所有命令都需要 op 权限。
? 权限节点
eternaldeathdrops.backup – 允许使用 /backup
eternaldeathdrops.clear – 允许使用 /cleareternaldrops
eternaldeathdrops.reload – 允许使用 /eternaldeathdrops reload
⚡ 性能表现
- 在 Paper 1.21.11 环境下测试,单个区块内放置 6000 组物品,MSPT 增加了 10-20%(从 ~9-10 mspt 增至 ~10-12 mspt)。
- 基于默认配置进行测试。
- 从执行
/backup 到 backup 目录生成 .zip 文件,最长等待时间为 3 秒。
? 兼容性
- 该插件仅基于 Bukkit API 编写,因此兼容 Bukkit、Paper、Purpur、Spigot 以及其他包含 Bukkit API 的服务端核心(不兼容 Folia)。
- 插件仅使用 1.14+ 版本的 Bukkit API,因此可用于各种服务器。
⚙️ 配置
插件首次运行时会自动生成默认的 config.yml。关键设置如下:
# 启用/禁用插件功能
features:
backup: true # 启用自动备份。默认值:true
eternal-items: true # 启用永恒死亡掉落。默认值:true
# 要备份的世界文件夹(服务器根目录下的文件夹名称列表)
# 如果未指定或为空,将使用默认世界:world, world_nether, world_the_end
worlds:
- "world"
- "world_nether"
- "world_the_end"
# 永恒物品的存活刻数(0 = 永久,20 刻 = 1 秒)
eternal-lifetime-ticks: 0
# 过期物品检查之间的时间间隔,以及计时器滴答之间的时间间隔(默认 = 20 刻 = 1 秒)
# 此值越高,性能越好,但可能导致计时器的精度降低
time-between-checks: 20
# 此选项控制物品生命周期的计时器是否仅在
# 已加载的区块中滴答作响(默认值 = true)
do-items-only-tick-in-loaded-chunks: true
# 此选项控制其他玩家是否可以拾取你的死亡掉落物品(默认值 = true)
can-other-players-pickup-death-drops: true
# 此选项控制生物是否可以拾取玩家的死亡掉落物品(默认值 = true)
can-other-mobs-pickup-death-drops: true
# 这些选项控制死亡后物品的散布方式(默认值与原版一致)
death-item-spread:
x: 0.5 # X 轴随机偏移量(总范围 = ±x/2)。默认值:0.5
y: 0.2 # 添加到掉落位置的垂直偏移量。默认值:0.2
z: 0.5 # Z 轴随机偏移量(总范围 = ±z/2)。默认值:0.5
do-items-glow: false # 如果为 true,掉落的物品将发出白光。默认值:false
# 每个分类保留的最大备份数量(设置为 0 以禁用该分类)
max-backups:
startup: 3
hourly: 3
manual: 3
# 每小时备份的间隔时间(单位:刻)(0 = 禁用,20 刻 = 1 秒)
hourly-interval: 72000 # 1 小时
# 等待保存完成的超时时间(单位:刻)。
# 如果设置为 0 或负数,将使用默认值(600 刻 = 30 秒)。
# 如果你看到频繁的超时警告,请增加此值。
save-timeout-ticks: 600
# 必须显示无变化的连续检查次数(每 200ms 一次)
# 才能认为保存已完成。默认值 10 = 2 秒稳定性。
stability-checks: 10
# 达到稳定性后的延迟时间,单位:刻(20 刻 = 1 秒)。
# 这段额外的等待时间可确保所有数据都已刷新。默认值 20 = 1 秒。
post-stability-delay: 20
# ZIP 压缩级别(0 = 无压缩,9 = 最大压缩,默认值 6)
compression-level: 6
# 自定义备份分类(默认全部禁用)
# 你可以根据需要创建任意数量的分类
custom-categories:
custom1:
enabled: false
interval: 36000 # 30 分钟
folder-name: "custom1_backups"
max_backups: 3
custom2:
enabled: false
interval: 144000 # 2 小时
folder-name: "custom2_backups"
max_backups: 3
# 以下选项处于开发中(WIP),目前尚未生效
# 这些选项控制发光效果如何应用于物品
item-glowing:
enabled: false
color:
static: true # 如果为 true,则所有物品的颜色相同
color: "000000" # 仅适用于静态颜色。默认值:"000000"
based-on-the-dimensions: false # 如果为 true,则颜色将基于玩家死亡或物品所在的维度。默认值:false
based-on-the-player-dim: true # 如果为 true,则颜色将基于玩家死亡位置的维度。默认值:true
bosed-on-the-items-dim: false # 如果为 true,则颜色将基于物品所在位置的维度。默认值:false
dimensions: # 控制各维度的颜色。默认值:"- overworld: LIME"\n- "nether: RED"\n- "end: BLACK"。仅处理 Minecraft 的标准颜色
- "overworld: LIME"
- "nether: RED"
- "end: PURPLE"
based-on-the-owner: false # 如果为 true,则颜色将基于物品的所有者。默认值:false
# only-to-owner: false # 如果为 true,则只有物品所有者能看到发光效果。默认值:false
EternalDeathDrops – Backup & Eternal Death Drops
EternalDeathDrops is a lightweight, performance‑optimized plugin that combines two essential features for server administrators:
- Automated world backups – create scheduled backups of your worlds with custom categories and retention policies.
- Eternal death drops – items dropped on death never despawn (or have a configurable lifetime), ensuring no loot is lost.
✨ Features
-
Flexible backup system
- Built‑in categories:
startup, hourly, manual
- Fully customizable categories with independent intervals, folder names, and max backup count
- Configurable world list – backup only the worlds you specify
- Smart save‑wait algorithm (monitors
.mca and .dat files) with adjustable stability checks and timeouts
- Asynchronous ZIP compression with adjustable level (0–9)
- Automatic cleanup of old backups
-
Eternal death drops
- Items dropped by players are marked as "eternal" – they will never despawn (or will despawn after a customizable time in ticks)
- Persistent metadata across server restarts – items keep their lifetime counter
- Full support for item pickups – metadata is removed when picked up, and the item returns to normal behaviour
- Fully customizable and includes many features!
-
Performance first
- All heavy operations (backup creation, old backup deletion) run asynchronously
ChunkLoadEvent only processes items in the loaded chunk, not the whole world
- Minimal impact on MSPT – tested with 150 simultaneous player deaths with full inventories – MSPT increased by only ~14% (from ~7.X ms to 8.0 ms) during normal chunk loading, and up to 30 ms when loading chunks with thousands of items (which would drop client FPS from 120 to below 1).
-
Full configurability
- All features can be enabled/disabled via
config.yml
- Set your own world folders, lifetime ticks, backup intervals, retention limits, and compression level
? Commands
| Command |
Description |
Permission |
/backup |
Creates a manual backup of all worlds |
eternaldeathdrops.backup |
/cleareternaldrops |
Removes all eternal death drop items from the server |
eternaldeathdrops.clear |
/eternaldeathdrops reload |
Reloads the plugin configuration from disk |
eternaldeathdrops.reload |
All commands require op by default.
? Permissions
eternaldeathdrops.backup – allows using /backup
eternaldeathdrops.clear – allows using /cleareternaldrops
eternaldeathdrops.reload – allows using /eternaldeathdrops reload
⚡ Performance
- Tested on paper 1.21.11 with 6000 stacks of items in one chunk and mspt increased by 10-20%(from ~9-10 mspt to ~10-12 mspt).
- Tested with default config.
- Backups can be produced in up to 3 seconds of waiting from /backup to .zip file in backup directory.
? Compatibility
- Plugin was coded on just bukkit api so it compatible with Bukkit, Paper, Purpur, Spigot and other server-cores that have bukkit api in them(do not compatible with folia).
- Plugin uses only 1.14+ bukkit api so it can be used in various servers.
⚙️ Configuration
The plugin generates a default config.yml on first run. Key settings:
# Enable/disable plugin features
features:
backup: true # Enable automated backups. Default: true
eternal-items: true # Enable eternal death drops. Default: true
# World folders to backup (list of folder names in server root)
# If not specified or empty, default worlds will be used: world, world_nether, world_the_end
worlds:
- "world"
- "world_nether"
- "world_the_end"
# Lifetime of eternal items in ticks (0 = forever, 20 ticks = 1 second)
eternal-lifetime-ticks: 0
# Time beetween checks for expired items and time beetween ticking timers(default = 20 ticks = 1 second)
# The higher this value the more performance, but it can cause smaller accuracy of lifetime timers
time-between-checks: 20
# This option controls do timers of item's lifetime tick in only
# loaded chunks(default = true)
do-items-only-tick-in-loaded-chunks: true
# This option controls can other players pickup your death's items( default = true)
can-other-players-pickup-death-drops: true
# This option controls can mobs pickup playrs death's items(default = true)
can-other-mobs-pickup-death-drops: true
# These options controls how items spread after death(default values are equal to vanilla)
death-item-spread:
x: 0.5 # Random offset on X axis (total range = ±x/2). Default: 0.5
y: 0.2 # Vertical offset added to the drop position. Default: 0.2
z: 0.5 # Random offset on Z axis (total range = ±z/2). Default: 0.5
do-items-glow: false # If true, items will glow white when dropped. Default: false
# Maximum number of backups to keep for each category (set to 0 to disable the category)
max-backups:
startup: 3
hourly: 3
manual: 3
# Interval for hourly backup in ticks (0 = disabled, 20 ticks = 1 second)
hourly-interval: 72000 # 1 hour
# Timeout for waiting for save completion in ticks.
# If set to 0 or negative, the default (600 ticks = 30 seconds) will be used.
# Increase this value if you see frequent timeout warnings.
save-timeout-ticks: 600
# Number of consecutive checks (every 200ms) that must show no changes
# to consider save completed. Default 10 = 2 seconds of stability.
stability-checks: 10
# Delay after stability is achieved, in ticks (20 ticks = 1 second).
# This extra wait ensures all data is flushed. Default 20 = 1 second.
post-stability-delay: 20
# ZIP compression level (0 = no compression, 9 = maximum, default 6)
compression-level: 6
# Custom backup categories (all disabled by default)
# You can create as many of those as you need
custom-categories:
custom1:
enabled: false
interval: 36000 # 30 minutes
folder-name: "custom1_backups"
max_backups: 3
custom2:
enabled: false
interval: 144000 # 2 hours
folder-name: "custom2_backups"
max_backups: 3
# Options below are WIP and do not affect anything yet
# These options control how glowing effect will be applied to items
item-glowing:
enabled: false
color:
static: true # If true, the color will be the same for all items
color: "000000" # Only for static color. Default: "000000"
based-on-the-dimensions: false # If true, the color will be based on the dimension player died in or items in. Default: false
based-on-the-player-dim: true # If true, the color will be based on the player death location's dimension. Default: true
bosed-on-the-items-dim: false # If true, the color will be based on the item location's dimension. Default: false
dimensions: # Controls the color for dimensions. Default values: "- overworld: LIME"\n- "nether: RED"\n- "end: BLACK". Handle only minecraft's teams colors
- "overworld: LIME"
- "nether: RED"
- "end: PURPLE"
based-on-the-owner: false # If true color will be based on the owner of the item. Default: false
# only-to-owner: false # If true, the glowing effect will only be visible to the owner of the item. Default: false
评论 0
登录后参与评分
还没有评论,来抢沙发吧