-
Notifications
You must be signed in to change notification settings - Fork 1
Custom‐Loot.md
The Custom Loot System allows you to create your own loot tables for each chest tier using an in-game GUI editor. No need to edit YAML files!
/putintothechest
Permission: spawnchest.admin
Opens a GUI with 3 chest tier icons:
┌─────────────────────────┐
│ │
│ [📦] [📦] [📦] │
│ Common Rare Legend │
│ │
└─────────────────────────┘
Click any tier to edit its loot table.
┌─────────────────────────────────────┐
│ 0 1 2 3 4 5 6 7 8 │ ← Row 1: Items
│ 9 10 11 12 13 14 15 16 17 │ ← Row 2: Items
├─────────────────────────────────────┤
│ [🎲] [◀] [📄] [▶] [💾] [⬅] [🚫] │ ← Controls
└─────────────────────────────────────┘
Type - Info + Save Back Reset
┌─────────────────────────────────────┐
│ 0 1 2 3 4 5 6 7 8 │
│ 9 10 11 12 13 14 15 16 17 │
│ 18 19 20 21 22 23 24 25 26 │
│ 27 28 29 30 31 32 33 34 35 │
│ 36 37 38 39 40 41 42 43 44 │ ← Items area
├─────────────────────────────────────┤
│ [🎲] [◀] [📄] [▶] [💾] [⬅] [🚫] │ ← Controls
└─────────────────────────────────────┘
Location: Slot 1 (second from left)
Function: Switch between Single (27 slots) and Double (54 slots) chest
Behavior:
- Single → Double: All items transfer to larger chest
-
Double → Single:
- First 18 items stay in chest
- Excess items drop at your feet
- Settings preserved (fraction stays)
Example:
Before: Single chest with 10 items
Click: Toggle to Double
After: Double chest with same 10 items
Before: Double chest with 30 items
Click: Toggle to Single
After: Single chest with 18 items
12 items dropped at your feet
Location: Slot 4 (center)
Shows: Current drop rate setting
Display:
§eItem Drop Rate
§7This many items will spawn
§a1/3 - One third
Does NOT click - display only
Location: Slot 3 (left of display)
Function: Reduce fraction (fewer items)
Progression:
All → 1/2 → 1/3 → 1/4 → 1/5 → 1/6 → 1/7 → 1/8 → 1/9 → 1/10
Example:
- Currently: 1/3 (33% of items)
- Click: Changes to 1/4 (25% of items)
Location: Slot 5 (right of display)
Function: Increase fraction (more items)
Progression:
1/10 → 1/9 → 1/8 → 1/7 → 1/6 → 1/5 → 1/4 → 1/3 → 1/2 → All
Example:
- Currently: 1/3 (33% of items)
- Click: Changes to 1/2 (50% of items)
Location: Slot 6
Function: Save items and enable custom loot
What happens:
- Saves all items from chest area
- Sets
enabled: true - Closes GUI
- Shows confirmation message
- Returns to main menu
Message:
✓ Saved 15 items for common chests!
After saving:
- Custom loot is ACTIVE
- Chests of this tier will use your items
- Items are shuffled and fraction applied
Location: Slot 7
Function: Return to main menu without saving
What happens:
- Discards any changes
- Closes current GUI
- Opens main menu
Use case: Changed your mind, don't want to save
Location: Slot 8
Function: Clear all items and disable custom loot
Opens: Two-step confirmation system
Appearance:
┌─────────────────────────────────────┐
│ [⚠ WARNING] │
│ │
│ Tier: Common │
│ Current items: 25 │
│ │
│ Settings will be KEPT: │
│ • Chest type (single/double) │
│ • Drop rate fraction │
│ │
│ Only items will be deleted! │
│ │
│ [Continue] [Cancel] │
└─────────────────────────────────────┘
Yellow Green
Options:
- Continue (Slot 11): Proceed to final confirmation
- Cancel (Slot 15): Go back to editing
Appearance:
┌─────────────────────────────────────┐
│ [🔴 LAST CHANCE!] │
│ │
│ Tier: Common │
│ Items to delete: 25 │
│ │
│ SETTINGS WILL BE KEPT │
│ ONLY ITEMS WILL BE DELETED │
│ │
│ All items will drop at your feet │
│ │
│ [CONFIRM] [Cancel] │
└─────────────────────────────────────┘
Red Green
Options:
- CONFIRM (Slot 11): Execute reset
- Cancel (Slot 15): Go back to editing
✅ Deleted:
- All items in loot table
- Custom loot enabled status
✅ Preserved:
- Chest type (single/double)
- Item fraction setting
Example:
Before Reset:
- 30 items configured
- Double chest (54 slots)
- 1/3 fraction
After Reset:
- 0 items (all dropped at feet)
- Double chest (54 slots) ✓ KEPT
- 1/3 fraction ✓ KEPT
- Custom loot: DISABLED
- Open edit menu for tier
- Click item in YOUR inventory
- Item appears in chest area
- Click Save when done
- Shift-click item in your inventory
- Item moves to first empty slot in chest area
- Repeat for all items
- Click Save
- ✅ Item type and amount
- ✅ Enchantments
- ✅ Custom names
- ✅ Lore (description)
- ✅ Custom model data
- ✅ All NBT data
- ✅ Durability/damage
Example:
You place:
Diamond Sword
- Sharpness X
- Name: "§cDeath Bringer"
- Lore: "Forged in dragon fire"
Chest will drop exactly this item!
When chest spawns, plugin:
- Gets ALL items from your saved loot
- Shuffles them randomly
- Takes fraction of items
- Places them in spawned chest
Loot table: 30 items configured
| Fraction | Items in chest | Percentage |
|---|---|---|
| All | 30 items | 100% |
| 1/2 | 15 items | 50% |
| 1/3 | 10 items | 33% |
| 1/4 | 7-8 items | 25% |
| 1/5 | 6 items | 20% |
| 1/10 | 3 items | 10% |
Minimum: Always at least 1 item
All items:
- Every chest gets everything
- No randomness in quantity
- Still shuffled order
1/2 - Half:
- Good balance of variety and quantity
- Each chest feels unique
1/3 - One third (Default):
- Recommended for large loot pools
- Keeps chests exciting
- Players need to open multiple chests
1/10 - One tenth:
- Very rare items only
- Makes each item special
- Use for 100+ item loot pools
- Item area: 18 slots (2 rows)
- Controls: 9 slots (bottom row)
- Best for: Small loot pools (5-15 items)
- Item area: 45 slots (5 rows)
- Controls: 9 slots (bottom row)
- Best for: Large loot pools (20-45 items)
Use Single Chest when:
- Simple loot (10-20 items)
- Want faster setup
- Common tier (basic items)
Use Double Chest when:
- Complex loot (30+ items)
- Legendary tier (many items)
- Want variety
Top rows: Common items (dirt, wood, food)
Middle rows: Valuable items (diamonds, gear)
Bottom rows: Rare items (legendary items)
Don't put:
64 Diamonds
64 Netherite Ingots
64 Enchanted Golden Apples
Instead:
5 Diamonds
2 Netherite Ingots
1 Enchanted Golden Apple
[Fill rest with balanced items]
✅ Good mix:
- Weapons (3-5 items)
- Armor (4-6 items)
- Tools (3-5 items)
- Food (5-10 items)
- Blocks (5-10 items)
- Potions (3-5 items)
❌ Bad mix:
- Only weapons (boring)
- Only diamonds (too OP)
30 items total:
- 1/3 fraction = ~10 items per chest
- Each player gets different items
- Encourages trading
Chest type: Single (27 slots)
Fraction: 1/2
Items (18 total):
- Iron Sword x1
- Iron Chestplate x1
- Iron Pickaxe x1
- Cooked Beef x16
- Golden Apple x2
- Ender Pearl x4
- Arrow x32
- Bow x1
- Diamond x3
- Iron Ingot x8
- Gold Ingot x5
- Coal x16
- Bread x10
- Water Bottle x2
- Torch x32
- Oak Log x16
- Cobblestone x64
- Dirt x32
Result: Each chest gets 9 random items from this pool
Chest type: Double (54 slots)
Fraction: 1/3
Items (45 total):
Weapons:
- Diamond Sword (Sharpness IV) x1
- Diamond Axe (Sharpness III) x1
- Bow (Power IV, Flame) x1
Armor:
- Diamond Helmet (Protection III) x1
- Diamond Chestplate (Protection III) x1
- Diamond Leggings (Protection III) x1
- Diamond Boots (Protection III, Feather Falling IV) x1
Tools:
- Diamond Pickaxe (Efficiency IV, Fortune II) x1
- Diamond Shovel (Efficiency IV) x1
- Diamond Axe (Efficiency IV) x1
Materials:
- Diamond x8
- Emerald x5
- Netherite Scrap x2
- Gold Ingot x16
- Iron Ingot x32
Food & Potions:
- Golden Apple x4
- Cooked Porkchop x16
- Potion of Strength II x2
- Potion of Speed II x2
- Potion of Regeneration x2
Special:
- Elytra x1
- Ender Pearl x8
- Totem of Undying x1
- Enchanted Book (Mending) x1
- Beacon x1
... (fill to 45 items)
Result: Each chest gets 15 random items - always exciting!
Chest type: Double (54 slots)
Fraction: All
Items (45 total):
Every legendary item:
- Dragon Slayer Sword x1
- Master Pickaxe x1
- Titan Axe x1
- Void Shovel x1
- Storm Hammer x1
- Guardian Bow x1
- Wisdom Book x2
- Phoenix Feather x1
- Poseidon's Trident x1
Ultra rare materials:
- Netherite Ingot x8
- Diamond x32
- Emerald x16
- Nether Star x2
- Dragon Egg x1 (if available)
- Elytra x2
Maxed gear:
- Netherite Helmet (Protection IV, Unbreaking III, Mending)
- Netherite Chestplate (Protection IV, Unbreaking III, Mending)
- Netherite Leggings (Protection IV, Unbreaking III, Mending)
- Netherite Boots (Protection IV, Unbreaking III, Mending, Feather Falling IV)
Special items:
- Enchanted Golden Apple x8
- Totem of Undying x3
- Summoner Apple x2
... (fill to 45)
Result: EVERY chest gets ALL items - jackpot every time!
1. Configure loot in GUI
2. Save it
3. Use /chestnow to spawn test chest
4. Open and check what spawns
5. Adjust fraction/items if needed
Halloween:
- Pumpkins
- Jack o'Lanterns
- Orange/Black blocks
- Skeleton/Zombie heads
Christmas:
- Snow blocks
- Ice
- Fireworks
- Presents (named items)
PvP Chest:
- Only weapons and armor
- Potions of Strength/Speed
- Golden Apples
- Arrows
Builder Chest:
- Only blocks
- Building tools
- Torches
- Scaffolding
If your server has economy:
- Don't put sellable items
- Or reduce valuable items
- Focus on unique/unsellable items
Check:
- Did you click Save?
- Is custom loot enabled? (should be green in main menu)
- Is fraction too low? (1/10 of 5 items = 0-1 items)
Check:
- Are you clicking in chest area (not control buttons)?
- Is chest full? (18 slots for single, 45 for double)
- Are control buttons protected? (they should be)
Check:
- Did items drop at your feet? (expected for double→single)
- Check console for errors
Check:
- Did you click through both confirmation menus?
- Items should drop at your feet
- Check
custom_loot.yml- items list should be empty
/plugins/SpawnChestPlugin/custom_loot.yml
common:
enabled: true
double-chest: false
item-fraction: "one-third"
items:
- ==: org.bukkit.inventory.ItemStack
v: 3465
type: DIAMOND_SWORD
meta:
==: ItemMeta
meta-type: UNSPECIFIC
display-name: "My Sword"
enchants:
DAMAGE_ALL: 5
rare:
enabled: false
double-chest: true
item-fraction: "one-half"
items: []
legendary:
enabled: true
double-chest: true
item-fraction: "all"
items: [...]Q: Can I have different loot for each tier?
A: Yes! Each tier (Common, Rare, Legendary) has its own loot table.
Q: Do I need to reload after saving?
A: No! Changes apply immediately.
Q: Can players see my custom loot settings?
A: No, only admins with permission can open the editor.
Q: What happens if I delete an item from loot while chest is spawned?
A: Already-spawned chests keep their loot. New chests use updated loot.
Q: Can I use custom items from other plugins?
A: Yes! Any item in your inventory can be added.
Q: Is there a limit to loot pool size?
A: Single chest: 18 items max, Double chest: 45 items max
Q: Can I export/import loot tables?
A: Yes, copy custom_loot.yml between servers.