Skip to content

Custom‐Loot.md

Fragmer2 edited this page Feb 3, 2026 · 3 revisions

🎨 Custom Loot System Guide

Overview

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!


Opening the Editor

Command

/putintothechest

Permission: spawnchest.admin

Main Menu

Opens a GUI with 3 chest tier icons:

┌─────────────────────────┐
│                         │
│   [📦]  [📦]  [📦]     │
│  Common Rare Legend     │
│                         │
└─────────────────────────┘

Click any tier to edit its loot table.


Edit Menu Layout

Single Chest (27 slots)

┌─────────────────────────────────────┐
│  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

Double Chest (54 slots)

┌─────────────────────────────────────┐
│  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
└─────────────────────────────────────┘

Control Buttons

🎲 Chest Type Toggle

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

📄 Item Fraction Display

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


◀ Fraction Decrease

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)

▶ Fraction Increase

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)

💾 Save & Enable

Location: Slot 6

Function: Save items and enable custom loot

What happens:

  1. Saves all items from chest area
  2. Sets enabled: true
  3. Closes GUI
  4. Shows confirmation message
  5. 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

⬅ Back

Location: Slot 7

Function: Return to main menu without saving

What happens:

  1. Discards any changes
  2. Closes current GUI
  3. Opens main menu

Use case: Changed your mind, don't want to save


🚫 Reset

Location: Slot 8

Function: Clear all items and disable custom loot

Opens: Two-step confirmation system


Reset Confirmation System

Step 1: First Warning (Yellow Menu)

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

Step 2: Final Warning (Red Menu)

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

What Gets Reset

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

Adding Items to Loot Table

Method 1: Place from Inventory

  1. Open edit menu for tier
  2. Click item in YOUR inventory
  3. Item appears in chest area
  4. Click Save when done

Method 2: Shift-Click

  1. Shift-click item in your inventory
  2. Item moves to first empty slot in chest area
  3. Repeat for all items
  4. Click Save

Item Properties Preserved

  • ✅ 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!

Item Fraction System

How It Works

When chest spawns, plugin:

  1. Gets ALL items from your saved loot
  2. Shuffles them randomly
  3. Takes fraction of items
  4. Places them in spawned chest

Fraction Examples

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


Fraction Strategy Guide

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

Chest Type System

Single Chest (27 slots)

  • Item area: 18 slots (2 rows)
  • Controls: 9 slots (bottom row)
  • Best for: Small loot pools (5-15 items)

Double Chest (54 slots)

  • Item area: 45 slots (5 rows)
  • Controls: 9 slots (bottom row)
  • Best for: Large loot pools (20-45 items)

When to Use Each

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

Best Practices

1. Organize by Value

Top rows: Common items (dirt, wood, food)
Middle rows: Valuable items (diamonds, gear)
Bottom rows: Rare items (legendary items)

2. Balance Quantities

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]

3. Mix Item Types

✅ 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)

4. Use Fractions Wisely

30 items total:
  - 1/3 fraction = ~10 items per chest
  - Each player gets different items
  - Encourages trading

Example Configurations

Example 1: Balanced Common Chest

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


Example 2: Rich Rare Chest

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!


Example 3: Ultra Legendary Chest

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!


Tips & Tricks

Tip 1: Test Your Loot

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

Tip 2: Seasonal Loot

Halloween:
- Pumpkins
- Jack o'Lanterns
- Orange/Black blocks
- Skeleton/Zombie heads

Christmas:
- Snow blocks
- Ice
- Fireworks
- Presents (named items)

Tip 3: Themed Chests

PvP Chest:
- Only weapons and armor
- Potions of Strength/Speed
- Golden Apples
- Arrows

Builder Chest:
- Only blocks
- Building tools
- Torches
- Scaffolding

Tip 4: Economy Balance

If your server has economy:
- Don't put sellable items
- Or reduce valuable items
- Focus on unique/unsellable items

Troubleshooting

Items not appearing in spawned chest

Check:

  1. Did you click Save?
  2. Is custom loot enabled? (should be green in main menu)
  3. Is fraction too low? (1/10 of 5 items = 0-1 items)

Can't place items in edit menu

Check:

  1. Are you clicking in chest area (not control buttons)?
  2. Is chest full? (18 slots for single, 45 for double)
  3. Are control buttons protected? (they should be)

Chest type won't change

Check:

  1. Did items drop at your feet? (expected for double→single)
  2. Check console for errors

Reset not working

Check:

  1. Did you click through both confirmation menus?
  2. Items should drop at your feet
  3. Check custom_loot.yml - items list should be empty

Advanced: Manual YAML Editing

File Location

/plugins/SpawnChestPlugin/custom_loot.yml

Structure

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: [...]

⚠️ Warning: Manual editing is complex! Use GUI instead.


FAQ

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.

Clone this wiki locally