# DeathChest (PySpigot)
DeathChest is a PySpigot/Paper plugin that moves a player's drops and XP into a protected Ender Chest at their death location. It adds TextDisplay holograms, dialog-driven UIs, and SQLite persistence so chests can be restored after restarts.
## Features
- Auto-spawns an Ender Chest at a safe block with sounds/particles and per-chest holograms.
- Dialog UI (/dc) to list chests, teleport/fetch/open/delete, plus an admin config screen.
- Custom inventory UI with action buttons (Claim All, Claim XP, Details, Clear All) and optional lock timer for non-owners.
- Configurable chest lifetime, per-player chest limits, world allowlist, permission-based lifetimes, and XP-claim rules.
- Async SQLite storage at `PySpigot/data/death_chest.db` with automatic restore on startup.
- Sends holograms to joining players, prevents breaking managed Ender Chests, and includes feature flags in `constants.py`.
## Requirements
- Paper 1.21.8+ running **PySpigot** (Jython 2.7) with this project enabled via `project.yml` (points to `main.py`).
- **PacketEvents** plugin (used for TextDisplay packets).
- Paper build that ships `io.papermc.paper.dialog` and `PlayerCustomClickEvent` (Dialog UI).
## Key Files
- Code entrypoint: `main.py`
- Config: `PySpigot/data/death_chest_config.yml`
- Database: `PySpigot/data/death_chest.db`
- Logs: `PySpigot/data/death_chest.log`
## Quick Install
1) Place this project folder in your PySpigot projects directory (e.g., `PySpigot/projects/death_chest`).
2) Ensure `project.yml` contains `main: 'main.py'`.
3) Restart the server or reload PySpigot so the project loads.
4) Verify PacketEvents is enabled and your Paper build supports the Dialog API.
## Usage
- On death: items/XP are captured into an Ender Chest at the death location (no ground drops).
- Interact: right-click the Ender Chest to open the custom inventory with action buttons (Claim All, Claim XP, Details, Clear All).
- Command `/dc` (Dialog UI):
- `list` – view your own chests.
- `view <player>` – view another player's chests.
- `config` – open the admin config UI.
- Dialog chest actions: Teleport, Fetch (bring chest to the player), Open inventory, Delete chest.
- Expiry: chests despawn after `lifetime_seconds` (default 120s) with warning and cleanup effects.
## Default Permissions (editable in config)
- `dc.list` – use `/dc list`
- `dc.view` – use `/dc view <player>`
- `dc.config` – open the config UI
- `dc.use.tp` – teleport to a chest
- `dc.use.fetch` – fetch a chest
- `dc.use.delete` – delete a chest
- `dc.use.open` – open via UI
- `dc.admin` – bypass limits/locks
## Config (`PySpigot/data/death_chest_config.yml`)
```yaml
permissions:
cmd_list: dc.list
cmd_view: dc.view
cmd_config: dc.config
tp: dc.use.tp
fetch: dc.use.fetch
delete: dc.use.delete
open: dc.use.open
admin: dc.admin
settings:
lifetime_seconds: 120 # Chest lifetime (seconds)
update_interval: 20 # Hologram update interval (ticks)
max_chests_per_player: 0 # 0 = unlimited
unlock_seconds: 0 # Lock time for non-owners (0 = no lock)
allow_non_owner_claim_xp: true
allowed_worlds: [] # Empty = all worlds
permission_timers: [] # List of "perm:seconds" entries for lifetimes
hologram:
lines:
- "Death Chest | {playerName}"
- "Cause: {cause} XP: {xp} Items: {items}"
- "Despawn in: {time}"
- ""
- ""
- ""
- ""
- ""
- ""
- ""
see_through: true
has_shadow: false
background_transparent: true
offset_x: 0.0
offset_y: 1.5
offset_z: 0.0
line_spacing: 0.3
font_size: 1.0
```
### Supported placeholders (hologram/dialog)
`{playerName}`, `{cause}`, `{xp}`, `{items}`, `{time}`, `{world}`, `{x}`, `{y}`, `{z}`. Placeholders are replaced per chest; time lines can be colorized dynamically.
Quick facts
- Edition: Minecraft Java
- File type: .jar
- Minecraft version listed: 1.21
- How to install: Install the matching mod loader (Forge, Fabric or NeoForge) for your Minecraft version. → Download the .jar. → Put it in the .minecraft/mods folder and launch that loader profile.
- Where to get it: Opens on Spigot — not every file is mirrored on our own servers.
Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.
⭕PySpigot | Death Chest is a free Minecraft Java mod. Compatible with Minecraft 1.21. Downloaded 13 times (via Spigot). Download it and open it directly in the game.