PersonalizedLoot
Overview
PersonalizedLoot is a unique Spigot plugin that revolutionizes the multiplayer looting experience by giving every player their own personalized loot from the same chest! Say goodbye to the "first come, first served" looting system - now every player on your server can enjoy their own unique treasure from dungeon chests, mineshaft loot, temple rewards, and more.
Feature Highlights
Unique Loot Per Player
- Each player receives their own randomly generated loot from every loot chest
- Players A, B, and C can all loot the same chest and get completely different items
- No more racing to chests or arguing over loot distribution!
Persistent Data Storage
- All player loot is automatically saved when the server shuts down
- Data persists across server restarts - players will always see their own loot
- Loot changes (taking items, reorganizing) are saved per player
- Stored securely in plugins/PersonalizedLoot/data/
Works with ALL Loot Chests
- Dungeon chests
- Mineshaft chests
- Desert temple treasures
- Jungle temple loot
- Stronghold chests
- End city loot
- Shipwreck containers
- Buried treasure
- Any chest with a naturally generated loot table!
Lightweight & Performance-Friendly
- Efficient memory usage with concurrent data structures
- Minimal server overhead
- No lag or performance issues
- Clean, optimized code
Automatic Loot Table Management
- Preserves original loot table references
- Generates fresh loot for each new player
- Prevents vanilla loot regeneration
- No configuration needed - works out of the box!
Installation Instructions
Requirements
- Minecraft Version: 1.21
- Server Software: Spigot or Paper 1.21+
- Java Version: Java 17 or higher
Installation Steps
- Download the PersonalizedLoot.jar file
- Stop your server (if it's running)
- Place the JAR file into your server's plugins/ folder
YourServer/
└── plugins/
└── PersonalizedLoot.jar
- Start your server
- Verify installation by checking your console for:
[PersonalizedLoot] PersonalizedLoot plugin enabled!
That's it! No configuration files needed - the plugin works automatically!
How It Works
For Server Owners
Once installed, the plugin runs completely automatically. There's nothing to configure!
- When a player opens a loot chest for the first time, the plugin generates unique loot from the chest's loot table
- This loot is stored with the player's UUID as the key
- When they reopen the chest, they see their previously generated loot
- When a different player opens the same chest, they get their own unique loot generated
For Players
The experience is seamless and intuitive:
- First Visit: Open any loot chest - you'll see randomly generated loot (just like normal Minecraft)
- Take Items: Grab what you want, leave what you don't
- Return Later: Your items will still be there (or not, if you took them)
- Teammates: Your friends can loot the same chest and get completely different items!
Data Management
Storage Location
All data is stored in: plugins/PersonalizedLoot/data/
Each chest creates two files:
- Loot table reference: loottables.dat (tracks which loot tables belong to which chests)
- Player-specific loot: worldname_x_y_z.dat (one file per chest location)
Data Format
- Files are stored in binary .dat format using Java serialization
- Player loot is keyed by UUID for security and accuracy
- Chest locations use world name + coordinates for unique identification
Automatic Saving
Data is automatically saved in these scenarios:
- When a player closes a chest (saves their current inventory state)
- When a chest is broken by any player
- When the server shuts down (saves all data)
Technical Details
Event Handling
The plugin listens to three main events:
- PlayerInteractEvent: Detects when players open chests, generates/loads loot
- InventoryCloseEvent: Saves the current state of the chest for that player
- BlockBreakEvent: Cleans up data when chests are destroyed
Loot Generation Process
- Player right-clicks a chest
- Plugin checks if chest has a loot table
- If yes, stores the loot table reference
- Checks if this player has opened this chest before
- If not, generates fresh loot using the stored loot table
- Populates the chest with player-specific loot
- Player's changes are saved when they close the chest
Thread Safety
- Uses ConcurrentHashMap for thread-safe data access
- Safe for multi-threaded server environments
- No race conditions or data corruption
Frequently Asked Questions
Q: Does this work with modded chests or custom loot tables?
A: Yes! As long as the chest uses Minecraft's loot table system, it will work.
Q: What happens if a chest is broken?
A: The plugin saves all player data for that chest before removal. If the chest is replaced, it will be treated as a new chest.
Q: Can I reset a player's loot for a specific chest?
A: Currently, you would need to manually delete the chest's .dat file from the data folder while the server is stopped.
Q: Does this work with double chests?
A: Yes, but each half of a double chest is tracked separately.
Q: Will this cause lag on my server?
A: No! The plugin is extremely lightweight and only processes data when players interact with loot chests.
Q: What if I update from an older Minecraft version?
A: Make sure to backup your plugins/PersonalizedLoot/ folder before updating. The plugin is designed for 1.21 specifically.
Permissions & Commands
Currently: This plugin requires no permissions and has no commands - it works automatically for all players!
Enjoy PersonalizedLoot!
Thank you for using PersonalizedLoot! If you enjoy this plugin, please leave a review and share it with others. Your support helps keep this project alive and encourages future updates!
Happy Looting!