Skip to content

Lost Items

Jan Kluka edited this page Nov 26, 2026 · 4 revisions

Lost Items

Since 2026.3.16.0

Lost Items is a personal storage for items that could not reach a player's inventory. Instead of dropping a bomb, booster or pickaxe on the ground (or losing it), X-Prison keeps it for the player until they claim it with /lostitems.

Everything lives in lost-items.yml. Lost Items is a module, so it switches off like any other with modules.lost_items in config.yml. With it off, items that do not fit are dropped at the player's feet as before.


What ends up in Lost Items

Source When
Bombs /bombs give (and the Bombs API) when the inventory is full, a bomb handed back because its explosion was cancelled, the rest of a dropped bomb stack
Boosters /boosters give when the inventory is full
Pickaxe the first-join pickaxe, items kept on death and returned on respawn, a soulbound pickaxe returned to its owner
Pets (1.5.0+) a pet or Pet Egg from /petsadmin give / give-egg, hatching or fusing
Lucky Blocks (1.2.0+) a lucky block found with a full inventory (drop.on-inventory-full: LOST_ITEMS, the default for new installs), /luckyblocks give
Crystals (1.3.0+) /crystals give --item when the inventory is full
Attachments (1.3.0+) /attachments give --item and /attachments slots when the inventory is full
Shop (1.1.1+), Black Market (1.3.1+) a bought item that still does not fit after paying (purchases are still refused up front when there is no room)
Armors (2.2.1+) an armor piece from /armors give or a set claim, armor kept on death and returned on respawn
Robots (1.3.1+) a robot from /robotsadmin give when the inventory is full
Dashboard (1.7.5+) a pickaxe from Give Pickaxe when the inventory is full (it used to be deleted)
X-Warden (1.1.1+) a quarantined item restored to its owner when the inventory is full
Other add-ons anything an add-on delivers through the Lost Items API

Offline players. /bombs give <player> and /boosters give <player> now also work for players who are offline: the items wait in their Lost Items until they join. A soulbound pickaxe returned to an offline owner is stored the same way - it used to be held in memory only and was lost on a restart.

Not stored: blocks you mine while your inventory is full (AutoSell's "inventory full" stays as it is), and items given by other plugins' commands, such as vanilla /give in a reward list.

Items are kept until the player claims or deletes them; there is no limit and no expiry.


The menu

/lostitems (alias /lostitem) opens a 6-row menu:

Button Default slot What it does
Claim Lost Items (chest) 0 Moves the items the filter shows into your inventory until it is full
Lost Items (compass) 4 Info, with the number of stored items
Stored items 9 - 44 Left- or right-click an item to claim it. Each shows where it came from and when
Filter (hopper minecart) 45 Cycles All → each source the player has items from → All
Previous / next page 48 / 50 Only shown when there is more than one page
Sort (gold ingot) 52 Newest first / oldest first
Delete Items (lava bucket) 53 Deletes the items the filter shows, after a YES / NO confirmation. They cannot be recovered

Everything in the menu - slots, materials, names, lore, the per-item lore and the source names in sources: - is in gui: in lost-items.yml, and it is translated for players reading German, Spanish, French or Portuguese.

Claiming is safe against duplication: an item is removed from the storage before it is handed over, so a double click, lag or a second server on the same MySQL database cannot claim it twice. If only part of a stack fits, the rest stays in the storage.


Notifications

notifications:
  on-join: true                 # "You have 3 item(s) waiting for you - /lostitems"
  on-join-delay-seconds: 3
  on-store: true                # "Your inventory is full - 1x Tiny Bomb was kept for you in /lostitems."
  on-store-cooldown-seconds: 10 # at most one such message per player in this many seconds

Both messages have a clickable /lostitems.


Staff

/lostitems <player> (permission xprison.lostitems.others) opens anyone's storage, online or offline. Staff can claim items into their own inventory or delete them, exactly like the owner.


Commands & Permissions

Command Permission Description
/lostitems xprison.lostitems (everyone) Open your Lost Items. Alias: /lostitem and anything under commands
/lostitems <player> xprison.lostitems.others Open, claim and delete another player's Lost Items, also offline

Season reset

Lost Items appears in the Season Reset menu as lost_items and is wiped by default - untick it to let players keep unclaimed items into the new season.


For developers

Use the Lost Items API instead of player.getInventory().addItem(...) whenever an item must not be lost. It is available even when the module is off.

XPrisonLostItemsAPI lostItems = XPrisonAPI.getInstance().getLostItemsApi();

// Online player: whatever does not fit goes to their Lost Items.
lostItems.give(player, item, "pets");

// Player who may be offline: stored until they claim it.
if (!lostItems.deliver(uuid, item, "pets")) {
    // Lost Items is turned off and the player is offline - keep or refund the item yourself.
}

The source is a short id shown in the menu and used by its filter. Add a name for it under sources: in lost-items.yml (e.g. pets: Pets), otherwise the id itself is shown. Both methods copy the item and are safe to call from any thread.

A bomb given to an offline player through /bombs give does not fire BombGiveEvent, because there is no online player to fire it for.

Data is stored in the XPrison_LostItems table.

XPrison Logo

General

Modules

Default Configs

Enchant Configs — Passive

Enchant Configs — Currency Rewards

Enchant Configs — Key & Item Rewards

Enchant Configs — Area of Effect

Enchant Configs — Multipliers

Enchant Configs — Templates

Enchant Configs — Addons

Addons

Support

For Developers

Others

Clone this wiki locally