# Simple Graves
When a player dies, their inventory and
experience are stored in a grave block at the death location instead of
scattering across the ground. The grave is protected so only the owner
(and optionally ops) can open it until it expires or its protection
window runs out.
**Unique feature**: server admins can exclude specific players from ever
getting a grave. Excluded players either drop items normally on death
(vanilla behavior) or, if configured, lose their items entirely.
## Features
- Grave placed at the death location (with fallback search if the spot
is unsuitable — inside terrain, in a wall, etc.)
- Stores all main inventory, armor, offhand items, and (optionally) XP
- Grave is protected: only the owner can open it for a configurable
number of seconds (or forever, or never — fully configurable)
- Ops can optionally bypass protection
- Graves auto-expire after a configurable time and spill their contents
on the ground
- Ambient soul particles, configurable sounds on creation/claim
- Death-location chat message to the owner; optional nearby-player
announcement
- **Grave Compass**: on death, the player receives a compass that points
toward their grave (vanilla lodestone-tracker needle behavior), lets
them check the grave's remaining contents and protection status with a
right-click, and — sneak + right-click — remotely removes the grave's
protection so anyone can loot it (handy if you want a friend to grab
your stuff without having to find/share coordinates)
- **Per-player exclusion list** — chosen players never get a grave
- In-game `/graves` command to manage the exclusion list and view
config without editing files
- Practically indestructible by mining (50 hardness / 1200 blast
resistance) — it's removed only by being claimed or expiring
### The Grave Compass
When `giveGraveCompass` is enabled (default), dying with a grave gives you a
compass item that:
- Points toward your grave, using the same needle behavior as a vanilla
lodestone compass.
- **Right-click** the compass to see the grave's remaining contents,
distance, and protection status in chat.
- **Sneak + right-click** the compass to remove the grave's protection
remotely — after this, anyone can loot the grave, not just you. Useful
if you want a friend to recover your items for you.
- If the grave has already been claimed or has expired, using the compass
tells you it's gone instead of pointing at nothing.
The compass works across dimensions (it'll tell you if the grave's
dimension isn't currently loaded) and stores its target using the item's
own data, so it keeps working even if you log out and back in.
### Excluding players from graves
Add a player's name (or UUID, for name-change safety) to
`excludedPlayers`, either by editing the JSON directly or via command:
```
/graves exclude add Notch
/graves exclude remove Notch
/graves exclude list
```
When `excludedPlayersDropItemsNormally` is `true` (default), excluded
players just get vanilla item-scatter behavior on death — no grave at
all. If set to `false`, their items are removed entirely on death
instead (use with care — this is permanent item loss).
### Other admin commands
```
/graves list — list tracked grave positions in the current world
/graves reload — reload simplegraves.json from disk without restarting
```
All `/graves` subcommands require permission level 2 (op).
## Notes on design choices
- Item capture happens on Fabric API's `ServerLivingEntityEvents.ALLOW_DEATH`,
which fires before vanilla's `dropInventory()` runs, so the player's
inventory is copied into the grave and cleared *before* vanilla has a
chance to scatter it on the ground.
- The grave block is set to `dropsNothing()` with very high hardness/blast
resistance so it can't realistically be mined away — the only ways to
remove it are right-clicking as an authorized player, or letting it
expire.
- A lightweight in-memory `GraveManager` registry tracks grave positions
per world purely for the `/graves list` convenience command; the actual
grave data lives in the block entity's NBT and persists fine across
restarts even though this registry doesn't (it's just rebuilt as new
graves are created during that session).
## Known limitations / possible follow-ups
- The placeholder grave texture/model is a simple procedurally generated
stone-ish block — swap in your own texture/model if you want something
fancier.
- `/graves list` only shows graves created during the current server
session (see note above); it doesn't scan the world for older ones.
- There's no GUI; everything is config-file + command driven.

