? SoulKeeper
你的物品会存活于死亡之后。你的进度亦是如此。
SoulKeeper 会在你死亡的瞬间,将你的完整背包和经验值捕获并封存到一个发光的灵魂中——即使经过熔岩、火焰甚至虚空也能完好保存,并安静地等待在你死亡的位置,直到你回来领取。

✨ 灵感来源
SoulKeeper 是 DeadSoulsKT 的精神续作——从头重构,采用清晰的跨平台架构、异步优先的设计,并高度注重可靠性。如果说 DeadSoulsKT 奠定了基石,那么 SoulKeeper 则为这一深受喜爱的机制带来了生产级持久化支持、丰富的视觉反馈以及跨平台兼容性。
? 灵魂运作原理
创建灵魂
当你死亡的那一刻,SoulKeeper 会在任何物品落地之前无声地拦截死亡事件。你的整个背包和可配置的掉落经验值部分会被捕获并作为灵魂存储到数据库中——没有任何东西会散落在地上。
一串红色粒子与一声共鸣的钟声宣告你的灵魂已诞生。灵魂以闪烁的粒子云形态出现,并带有悬浮的名称标签——“<你的名字> 的灵魂”——出现在你坠落的位置。
在末地生成的灵魂会被限制在最低 Y 轴坐标,以防止其坠入虚空。
拾取灵魂
只需靠近行走——无需右键、潜行或任何交互。一旦你进入灵魂的范围,它就会检测到你的存在并开始转移:
| 信号 |
含义 |
| ? 青色尘埃粒子 |
灵魂持有经验值 |
| ⚪ 白色尘埃粒子 |
灵魂持有物品 |
| ? 信标环境音效 |
灵魂在附近 — 跟随声音 |
| ? 紫色烟雾 + 铁砧音效 |
背包已满 — 仍有物品剩余 |
| ✨ 明亮闪光 + 熄灭音效 |
灵魂已完全收集并消失 |
物品会逐个背包槽位返回。如果背包已满,部分拾取机制将生效:经验值会被吸收,能放入的物品会尽可能存入,灵魂则保留剩余未放入的部分——即使背包已满,也绝不会掉落或丢失任何物品。
灵魂生命周期
死亡 → [私有] ──── 灵魂释放后 ────▶ [公开] ──── 灵魂消散后 ────▶ [已删除]
│ │
仅所有者 任何玩家
可拾取 可拾取
| 状态 |
拾取者 |
默认时机 |
| ? Private(私有) |
仅所有者 |
死亡后立即 |
| ? Public(公开) |
任何玩家 |
经过 soul_free_after 后(默认:2 天) |
| ? Gone(消失) |
— |
经过 soul_fade_after 后(默认:14 天) |
后台工作进程(FreeSoulWorker、DeleteSoulWorker)以可配置的刻数间隔运行,并自动推进灵魂的生命周期——无需 cron 任务、无需重启服务器、也无需管理员手动操作。
?️ Krates —— 备份存储
每次死亡还会写入一个 Krate:这是灵魂的独立 YAML 快照,保存到磁盘时与数据库完全独立。
plugins/SoulKeeper/
deaths/
<player-uuid>/
<epoch-second>_0.yml ← 第一个 krate
<epoch-second>_1.yml ← 第二个 krate(如果发生了重试)
...
Krates 是最后一道安全网。即使 SQLite 数据库丢失、损坏或回滚,管理员也可以从 krate 文件中恢复任何已故玩家的完整物品栏——完全不需要与数据库交互。
/soulkrate <uuid> <epoch-second> <index>
这会读取匹配的 <epoch>_<index>.yml krate 文件,并将其中的物品直接放入请求者的物品栏中。适用于以下情况:
- 繁忙时段发生数据库故障
- 玩家被外部工具回滚
- 需要从特定过去的死亡事件中恢复物品
? 功能特性
? 完全非阻塞
所有重型操作——灵魂创建、拾取检测、数据库读写、后台工作进程循环——均通过 KotlinDispatchers 分发到后台线程,使用 Kotlin 协程执行。主游戏线程绝不参与 I/O 操作。
?️ 安全且明确的处理失败路径
数据库操作返回 kotlin.Result<T>。失败会在调用点记录日志并优雅跳过——绝不会导致服务器崩溃、静默吞没物品或使灵魂处于损坏状态。SoulsDaoImpl 中的并发数据库写入、PickUpWorker 中的拾取循环,以及 ForgeSoulEvents/BukkitSoulEvents 中的死亡事件处理,各自都由独立的 Mutex 进行保护。
? Krate 安全网
每次死亡都会独立于数据库写入基于文件的快照。在灾难性的数据库故障中,物品不会丢失。
? 完全可自定义的效果
每种粒子(类型、颜色、大小、数量)和每种声音(ID、音量、音高)都可根据事件类型独立配置。六种音效提示、五种粒子效果——全部可在不修改代码的情况下调整。
⏳ 可配置的灵魂生命周期
soul_free_after 和 soul_fade_after 是普通的时间段值。可设置为秒、分钟、小时或天。后台服务从配置 Flow 中响应式轮询——更改无需重启即可实时重载。
? 部分拾取
当你的背包已满时,接近灵魂会优先收集经验值,随后尽可能多地拾取物品。剩余的物品由灵魂保留。待腾出空间后再返回即可——永远不会强制掉落任何物品。
?️ 虚拟悬浮名称标签
浮空的盔甲架名称标签(“<Player> 之魂”)通过 PacketEvents 以虚拟实体的形式在 Bukkit 上发送——不会在世界中生成任何真实实体,因此无论灵魂数量多少,性能均不受影响。
? 邻近灵魂召唤
SoulCallWorker 会追踪每位在线玩家的位置。当玩家进入可收集的灵魂 soul_call_radius 格范围内时,环境音效与粒子效果开始脉冲闪烁——即使在完全黑暗或深埋地下的情况下,也能引导他们返回。
? 末地维度安全机制
在末地生成的灵魂会被限制在 endLocationLimitY,确保它们永远不会掉落到岛屿地面以下而变得无法触及。
? 分页灵魂浏览器
/souls 列出所有可见的灵魂,包含拥有者名称、坐标、年龄(格式为“X天前”)以及物品/经验值指示器。管理员可在行内看到可点击的 [FREE] 和 [TP] 按钮。每页显示5个灵魂;包含上一页/下一页导航。
?️ 版本化数据库迁移
DatabaseMigrator 包含所有架构迁移步骤。升级插件无需手动执行 SQL —— 迁移会在启动时自动运行。
⚙️ 配置
所有设置均位于插件数据文件夹中的 config.yml 中,并可通过 /skreload 实现热重载。
# 数据库文件路径 (SQLite)
database: ...
# 灵魂在此时长后变为公开可收集状态
soul_free_after: 2d
灵魂在此持续时间后将永久消失
soul_fade_after: 14d
灵魂引导其主人发出声音/粒子效果的半径(方块)
soul_call_radius: 100
灵魂中存储的掉落经验值比例(0.0 – 1.0)
retained_xp: 1.0
末地中灵魂的最小 Y 坐标(防止虚空丢失)
end_location_limit_y: 0.0
在灵魂上方显示悬浮的“<玩家>之魂”名称标签
display_soul_titles: true
如何处理 PvP 死亡
NONE – PvP 死亡不产生灵魂
EXP_ONLY – 灵魂仅包含经验值
ITEMS_ONLY – 灵魂仅包含物品
EXP_AND_ITEMS – 灵魂包含所有内容(与正常死亡相同)
pvp_behaviour: NONE
### ? 音效
每个音频提示均可独立配置 `id`、`volume` 和 `pitch`:
| 按键 | 默认声音 | 触发条件 |
|---------------------|----------------------------------|------------------------------|
| `collect_xp` | `entity.experience_orb.pickup` | XP 从灵魂中吸收 |
| `collect_item` | `item.trident.return` | 物品从灵魂中吸收 |
| `soul_disappear` | `entity.generic.extinguish_fire` | 灵魂被完全收集 |
| `soul_dropped` | `block.bell.resonate` | 死亡时生成灵魂 |
| `soul_calling` | `block.beacon.ambient` | 灵魂在主人附近脉动 |
| `soul_content_left` | `block.anvil.place` | 背包已满,物品保留 |
### ? 粒子效果
每个粒子效果均可通过 `key`、`count` 和可选的 `dust_options`(RGBA 颜色 + 大小)进行独立配置:
| 键名 | 默认颜色 | 触发条件 |
|---------------------|------------------|----------------------------------|
| `soul_items` | 白色 `#FFFFFF` | 灵魂包含物品(持续状态) |
| `soul_xp` | 青色 `#00FFFF` | 灵魂包含经验值(持续状态) |
| `soul_created` | 红色 `#eb3437` | 灵魂创建时的爆发效果 |
| `soul_gone` | 黄色 `#FFFF00` | 收集完整时的爆发效果 |
| `soul_content_left` | 紫色 `#a103fc` | 背包已满警告 |
---
## ?️ 命令
| 命令 | 描述 | 权限 |
|-------------------------------------|------------------------------------|-----------------------|
| `/skreload` | 热重载配置和翻译 | `soulkeeper.reload` |
| `/souls [page]` | 列出你的灵魂(每页 5 个) | *(无)* |
| `/souls [page]` | 列出服务器上的**所有**灵魂 | `soulkeeper.all` |
| `/souls` → **\[FREE\]** | 立即强制释放任意灵魂 | `soulkeeper.free.all` |
| `/souls` → **\[TP\]** | 传送至某个灵魂的位置 | `soulkeeper.teleport` |
| `/soulkrate <uuid> <epoch> <index>` | 从 krate 文件恢复物品 | `soulkeeper.load` |
---
## ? 多平台支持
SoulKeeper 为每个受支持的平台提供**独立的 fat-jar**。所有核心逻辑——包括灵魂生命周期、拾取检测、数据库、后台工作进程和命令——都位于与平台无关的共享模块中。只有事件绑定和项目序列化是特定于平台的。
| 平台 | Jar | 最低版本 |
|--------------------|---------------------------|-------------|
| **Paper / Spigot** | `soulkeeper-bukkit.jar` | Paper 1.21.1|
| **Forge** | `soulkeeper-forge.jar` | Forge 1.21.1|
| **NeoForge** | `soulkeeper-neoforge.jar` | NeoForge 1.21.1|
选择适合你平台的 jar 文件并放入即可——相同的数据、相同的命令、在所有平台上行为一致。
---
## ? 预览
### 死亡时——灵魂生成
https://github.com/user-attachments/assets/ec5f1437-0dab-404f-a4a8-725ee1cd9129
### 返回时——灵魂被收集
https://github.com/user-attachments/assets/75f58f92-7d13-4c23-a7fb-b2d89476748b
---
## ⚠️ 已知不兼容项
- 会**取消或大量修改 `PlayerDeathEvent`**(Bukkit)或等效掉落事件(Forge/NeoForge)的插件可能会导致灵魂无法生成。当这些插件存在时,物品可能无法被正确捕获。
---
## ? 技术支持
1. 在干净的环境(无无关插件/模组)中复现问题。
2. 收集从服务器启动到问题出现期间的完整日志。
3. [加入我们的 Discord](https://discord.com/invite/8fEzV2TDS2) 并在 `#support` 频道提交工单。
## ? 功能请求
在我们的 [Discord](https://discord.com/invite/8fEzV2TDS2) 的 `#suggestions` 频道中提交工单,我们将在创建 GitHub issue 之前进行讨论。
---
<div align="center">
来自 [AstraInteractive](https://github.com/Astra-Interactive) 的更多插件
</div>
👻 SoulKeeper
Your items survive death. So does your progress.
SoulKeeper captures your full inventory and experience into a glowing soul the instant you die — persisting through lava, fire, and even the void — and waits quietly at the death spot until you return to claim it.

✨ Inspiration
SoulKeeper is the spiritual successor of DeadSoulsKT — rebuilt from scratch with a clean multiplatform architecture, async-first design, and a strong focus on reliability. Where DeadSoulsKT laid the foundation, SoulKeeper brings production-grade persistence, rich visual feedback, and cross-platform support to the same beloved mechanic.
💀 How Souls Work
Creating a soul
The moment you die, SoulKeeper silently intercepts the death event before anything hits the ground. Your entire inventory and a configurable portion of your dropped XP are captured and stored in the database as a soul — nothing is scattered across the floor.
A burst of red particles and a resonant bell signal that your soul has been born. The soul appears as a shimmering particle cloud with a floating nameplate — "Soul of <Your Name>" — right where you fell.
Souls spawned in The End are clamped to a minimum Y so they can never sink into the void.
Picking up a soul
Just walk close — no right-click, no shift, no interaction. As soon as you enter the soul's range, it detects you and begins transferring:
| Signal |
Meaning |
| 🔵 Cyan dust particles |
Soul holds XP |
| ⚪ White dust particles |
Soul holds items |
| 🔔 Beacon ambient sound |
Soul is nearby — follow the sound |
| 🟣 Purple smoke + anvil sound |
Inventory full — items still remain |
| ✨ Bright flash + extinguish sound |
Soul fully collected and gone |
Items flow back inventory-slot by inventory-slot. If your inventory is full, partial pickup works: XP is absorbed, whatever fits goes in, and the soul persists with only what remains — no items are ever dropped or lost because of a full bag.
Soul lifecycle
Death → [PRIVATE] ──── soul_free_after ────▶ [PUBLIC] ──── soul_fade_after ────▶ [DELETED]
│ │
Only owner Any player
can collect can collect
| State |
Who can collect |
Default timing |
| 🔒 Private |
Owner only |
Immediately after death |
| 🔓 Public |
Any player |
After soul_free_after (default: 2 days) |
| 💨 Gone |
— |
After soul_fade_after (default: 14 days) |
Background workers (FreeSoulWorker, DeleteSoulWorker) run on a configurable tick cadence and advance souls through this lifecycle automatically — no cron jobs, no restarts, no admin action needed.
🗃️ Krates — Backup Storage
Every death also writes a Krate: a standalone YAML snapshot of the soul, saved to disk independently of the database.
plugins/SoulKeeper/
deaths/
<player-uuid>/
<epoch-second>_0.yml ← first krate
<epoch-second>_1.yml ← second krate (if retry occurred)
...
Krates are a last-resort safety net. Even if the SQLite database is lost, corrupted, or rolled back, an admin can restore any dead player's exact inventory from the krate file — zero database interaction required.
/soulkrate <uuid> <epoch-second> <index>
This reads the matching <epoch>_<index>.yml krate file and deposits its items directly into the requesting player's inventory. Use it when:
- A database failure occurred during a busy session
- A player was rolled back by an external tool
- Items need to be restored from a specific past death
🚀 Features
🔄 Fully non-blocking
Every heavy operation — soul creation, pickup detection, database reads/writes, background worker loops — runs on Kotlin coroutines dispatched to background threads via KotlinDispatchers. The main game thread is never touched for I/O.
🛡️ Safe, explicit failure paths
Database operations return kotlin.Result<T>. Failures are logged at the call site and skipped gracefully — they never crash the server, silently eat items, or leave souls in a broken state. Concurrent DB writes in SoulsDaoImpl, the pickup loop in PickUpWorker, and death event handling in ForgeSoulEvents/BukkitSoulEvents are each guarded by their own Mutex.
📦 Krate safety net
A file-based snapshot is written on every death independently of the database. Items cannot be lost in a catastrophic DB failure.
🎨 Fully customizable effects
Every particle (type, color, size, count) and every sound (ID, volume, pitch) is independently configurable per event type. Six sound cues, five particle effects — all tweakable without touching code.
⏳ Configurable soul lifecycle
soul_free_after and soul_fade_after are plain duration values. Set them to seconds, minutes, hours, or days. Background services poll reactively from a config Flow — changes reload live without a restart.
📈 Partial pickup
If your inventory is full when you reach a soul, XP is collected first, then as many items as fit go in. The soul survives with the remainder. Walk back once you have space — nothing is ever force-dropped.
🏷️ Virtual floating name tags
Floating armor-stand nameplates ("Soul of <Player>") are sent as virtual entities via PacketEvents on Bukkit — no real entities are spawned into the world, so performance is unaffected regardless of soul count.
🔔 Proximity soul calling
A SoulCallWorker tracks every online player's position. When a player enters soul_call_radius blocks of a soul they can collect, ambient sounds and particles begin pulsing — guiding them back even in complete darkness or deep underground.
🌍 End dimension safety
Souls spawned in The End are clamped to endLocationLimitY so they never fall below the island floor and become unreachable.
📑 Paginated soul browser
/souls lists all visible souls with owner name, coordinates, age (formatted as "X days ago"), and item/XP indicators. Admins see clickable [FREE] and [TP] buttons inline. 5 souls per page; prev/next navigation included.
🗄️ Versioned database migrations
DatabaseMigrator carries all schema migration steps. Upgrading the plugin never requires manual SQL — migrations run automatically on startup.
⚙️ Configuration
All settings live in config.yml inside the plugin data folder and are hot-reloadable via /skreload.
# Database file path (SQLite)
database: ...
# Soul becomes publicly collectible after this duration
soul_free_after: 2d
# Soul disappears permanently after this duration
soul_fade_after: 14d
# Radius (blocks) within which a soul emits sounds/particles to guide its owner
soul_call_radius: 100
# Fraction of dropped XP stored in the soul (0.0 – 1.0)
retained_xp: 1.0
# Minimum Y for souls in The End (prevents void loss)
end_location_limit_y: 0.0
# Show floating "Soul of <player>" name tags above souls
display_soul_titles: true
# How PvP deaths are handled
# NONE – PvP deaths create no soul
# EXP_ONLY – soul holds XP only
# ITEMS_ONLY – soul holds items only
# EXP_AND_ITEMS – soul holds everything (same as normal death)
pvp_behaviour: NONE
🎵 Sounds
Every audio cue is independently configurable with id, volume, and pitch:
| Key |
Default sound |
Trigger |
collect_xp |
entity.experience_orb.pickup |
XP absorbed from soul |
collect_item |
item.trident.return |
Items absorbed from soul |
soul_disappear |
entity.generic.extinguish_fire |
Soul fully collected |
soul_dropped |
block.bell.resonate |
Soul created on death |
soul_calling |
block.beacon.ambient |
Soul pulsing near owner |
soul_content_left |
block.anvil.place |
Inventory full, items remain |
🌟 Particles
Every particle effect is independently configurable with key, count, and optional dust_options (RGBA color + size):
| Key |
Default color |
Trigger |
soul_items |
White #FFFFFF |
Soul contains items (continuous) |
soul_xp |
Cyan #00FFFF |
Soul contains XP (continuous) |
soul_created |
Red #eb3437 |
Burst on soul creation |
soul_gone |
Yellow #FFFF00 |
Burst on full collection |
soul_content_left |
Purple #a103fc |
Inventory full warning |
🛠️ Commands
| Command |
Description |
Permission |
/skreload |
Hot-reload config and translations |
soulkeeper.reload |
/souls [page] |
List your souls (5 per page) |
(none) |
/souls [page] |
List all server souls |
soulkeeper.all |
/souls → [FREE] |
Force-free any soul immediately |
soulkeeper.free.all |
/souls → [TP] |
Teleport to a soul's location |
soulkeeper.teleport |
/soulkrate <uuid> <epoch> <index> |
Restore items from a krate file |
soulkeeper.load |
🌐 Multiplatform
SoulKeeper ships a separate fat-jar for each supported platform. All core logic — soul lifecycle, pickup detection, database, background workers, commands — lives in shared platform-agnostic modules. Only event wiring and item serialization are platform-specific.
| Platform |
Jar |
Minimum version |
| Paper / Spigot |
soulkeeper-bukkit.jar |
Paper 1.21.1 |
| Forge |
soulkeeper-forge.jar |
Forge 1.21.1 |
| NeoForge |
soulkeeper-neoforge.jar |
NeoForge 1.21.1 |
Pick the jar for your platform and drop it in — the same soul data, the same commands, the same behaviour everywhere.
🎬 Preview
On death — soul created
Returning — soul collected
⚠️ Known Incompatibilities
- Plugins that cancel or heavily modify
PlayerDeathEvent (Bukkit) or the equivalent drop events (Forge/NeoForge) may prevent soul creation. Items may not be captured correctly when those plugins are present.
🐛 Support
- Reproduce the issue in a clean environment (no unrelated plugins/mods).
- Collect the full server log from startup through the issue.
- Join our Discord and open a ticket in
#support.
💡 Feature Requests
Open a ticket in #suggestions on our Discord and we'll discuss it before creating a GitHub issue.
评论 0
登录后参与评分
还没有评论,来抢沙发吧