# ๐๐ฆโ ๏ธ VIP Death Chest — Premium Death Protection for VIP Players
> **Your VIPs die in style — items safe in a chest, not scattered on the ground.**
---
## ๐ What is VIP Death Chest?
**VIP Death Chest** is a premium perk plugin that protects VIP players' items on death. Instead of items scattering on the ground where anyone can grab them, a secure chest is automatically placed at the death location containing all the player's inventory.
Fully integrated with the **BellLP VIP lifecycle** — death chests automatically activate when VIP is granted and deactivate on revocation, with smart location restoration when VIP is re-granted.
---
## โจ Features
- ๐ฆ **Automatic Death Chests** — Chest spawns at death location containing all items
- ๐ **Secure Storage** — Only the owner (and admins) can access the death chest
- ๐ **Smart State System** — ChestDataManager with active/saved state tracking
- โก **Auto-Activate on VIP Grant** — Chest system activates instantly via BellLP GroupSyncHandler
- โธ๏ธ **Auto-Deactivate on VIP Revoke** — Saves chest location and deactivates cleanly
- ๐ **Restore on Re-Grant** — Chest restored from saved location if the block still exists
- ๐งฉ **Graceful Handling** — Destroyed chests are handled silently (no-op on re-grant)
- ๐ **LuckPerms Integration** — Permission-based VIP detection via `vipdeathchest.use`
- ๐ **Admin Override** — Admins bypass all restrictions with `vipdeathchest.admin`
- โฐ **Configurable Expiry** — Set how long death chests persist before cleanup
- ๐ **Multi-Language** — Built-in English and Polish localization
---
## ๐ VIP Lifecycle Integration
```
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ VIP Lifecycle Flow โ
โ โ
โ BellGate โโ→ BellLP โโ→ VIP Death Chest โ
โ (Purchase) (Grant) (Activate Chest) โ
โ โ
โ VIP Granted โโ→ Chest System: ACTIVE โ
โ
โ VIP Revoked โโ→ Chest System: SAVED โธ๏ธ โ
โ VIP Re-Granted โโ→ Chest System: RESTORED ๐โ
โ Chest Destroyed โโ→ Silent No-Op ๐งฉ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
```
### How VIP Flow Works:
1. ๐ณ Player purchases VIP through **BellGate**
2. ๐ **BellLP** grants the VIP group and permissions
3. ๐ฆ **VIP Death Chest** auto-activates via GroupSyncHandler
4. โ ๏ธ On death → Items stored in a chest, not dropped
5. โ VIP expires → Chest location saved, feature deactivated
6. ๐ VIP renewed → Chest restored from saved location
---
## ๐ป Commands
| Command | Description |
|---------|-------------|
| `/vipchest` | Check your death chest status |
| `/vipchest info` | Show detailed chest information |
| `/vipchest reload` | Reload configuration (admin only) |
---
## ๐ Permissions
| Permission | Description | Default |
|------------|-------------|---------|
| `vipdeathchest.use` | VIP death chest access (auto-managed by BellLP) | false |
| `vipdeathchest.admin` | Admin commands and bypass | OP |
---
## ๐ฅ Installation
1. Download `VIP Death Chest.jar`
2. Place it in your server's `plugins/` folder
3. Restart the server
4. *(Recommended)* Install LuckPerms for permission-based VIP detection
5. *(Recommended)* Install BellLP for automatic VIP lifecycle management
6. Configure `config.yml`
---
## โ๏ธ Configuration Highlights
```yaml
# Death chest settings
chest:
duration: 3600 # Chest expiry time in seconds (0 = no expiry)
protect-from-explosions: true
protect-from-hoppers: true
# VIP detection
vip:
permission: "vipdeathchest.use"
auto-sync: true # Sync with BellLP VIP events
# Chest data persistence
data:
save-on-deactivate: true # Save chest location on VIP revoke
restore-on-reactivate: true # Restore from saved on VIP re-grant
check-block-exists: true # Verify block still exists before restore
# Language
language: en # en / pl
```
---
## ๐ Dependencies
| Type | Plugin | Required? | Purpose |
|------|--------|-----------|---------|
| — | — | โ
None required | Works standalone |
| Soft | LuckPerms | Recommended | Permission-based VIP detection |
| Soft | BellLP | Recommended | Full VIP lifecycle integration |
VIP Death Chest works standalone with manual permission assignment, but shines when paired with LuckPerms and BellLP for automatic VIP management.
---
## ๐ State System Explained
VIP Death Chest uses a sophisticated state management system:
| State | Description | Trigger |
|-------|-------------|---------|
| **ACTIVE** | Death chests are created on death | VIP permission granted |
| **SAVED** | Chest location stored, feature inactive | VIP permission revoked |
| **RESTORED** | Chest restored from saved location | VIP re-granted + block exists |
| **INACTIVE** | No chest data, feature off | No VIP permission / chest destroyed |
---
## ๐ฎ Player Experience
### VIP Player Dies:
```
โ ๏ธ You died!
๐ฆ Your items have been safely stored in a death chest.
๐ Location: x:123, y:64, z:-456
โฐ Chest expires in: 1 hour
```
### Non-VIP Player Dies:
```
โ ๏ธ You died!
๐ก Tip: VIP players get automatic death chests!
```
---
## ๐ค Part of the Bell Ecosystem
VIP Death Chest is designed to work seamlessly within the Bell plugin ecosystem:
- **BellGate** → Player purchases VIP
- **BellLP** → VIP group granted, permissions synced
- **VIP Death Chest** → Death chest auto-activated
- **ServerGuard** → Death chest events logged
---
## ๐ Requirements
- โ **Java 21+**
- ๐ง **Paper or Spigot 1.21+**
- ๐พ No required dependencies (LuckPerms + BellLP recommended)
---
## ๐ Support
- ๐ฌ **Discord:** [https://discord.gg/6q7bnSYaR](#)
- ๐ **Issues:** [GitHub Issues](#)
- ๐ **Wiki:** [Documentation](#)
- ๐ก **Feature Requests:** [Submit ideas](#)
---
## ๐ License
VIP Death Chest is developed and maintained as part of the Bell plugin ecosystem.
---
> ๐ *Give your VIPs the premium treatment — because dying shouldn't mean losing everything.*