Oxide Sync is live: your plugins install and update themselves →
BBPvP
FreePvP

Body Bag Despawn

by Base Inspector · v1.3.0 · updated Nov 8, 2026

No dependencies: works on its own.

Installs itself with Oxide Sync. Add it to a linked server from My servers. Every future update included. How it works

  • Full C# source
  • Free updates
  • Signed releases
  • Oxide / uMod compatible

Body Bag Despawn

Automatic Body Bag Cleanup for Rust Servers

Keep your Rust server clean, optimized, and free from abandoned body bags with Body Bag Despawn, a lightweight Oxide/uMod plugin that automatically removes dropped player body bags after a configurable amount of time.

Unlike standard loot cleanup behavior, Body Bag Despawn removes tracked bags regardless of whether they still contain items, helping prevent abandoned loot containers from accumulating across your map.

Designed with performance in mind, the plugin uses a single global timer and efficient entity tracking to minimize unnecessary processing.

Features

  • Automatic Body Bag Removal — Automatically despawns item_drop_backpack entities after a configurable duration.
  • Death-Based Despawn Timing — Tracks player corpse creation times and uses those timestamps to calculate when associated body bags should be removed.
  • Removes Bags Regardless of Contents — Bags are deleted even if they contain valuable loot.
  • Configurable Despawn Duration — Adjust the cleanup interval to match your server's gameplay.
  • Performance-Focused Design — Uses one global processing timer rather than creating a separate timer for every tracked bag.
  • Efficient Entity Detection — Caches prefab IDs to reduce unnecessary entity comparisons.
  • Automatic Tracking Cleanup — Removes expired death records and entries for destroyed bags.
  • Optional Debug Logging — Provides diagnostic information for troubleshooting.

How It Works

  1. Player Dies — The plugin tracks the player's death using the spawned corpse.
  2. Body Bag Appears — When a matching dropped backpack spawns, the plugin attempts to associate it with the recorded death.
  3. Despawn Timer Is Calculated — The plugin determines how much time remains in the configured cleanup window.
  4. Automatic Removal — Once the timer expires, the body bag is deleted, even if it contains items.

If the plugin cannot associate a spawned body bag with a recorded death, it starts the full configured timer from the bag's spawn time.

Default Configuration

{
  "Enabled": true,
  "DespawnSecondsFromDeath": 300.0,
  "ExtraBufferSeconds": 180.0,
  "Debug": false
}

Configuration Options

Enabled

Enables or disables automatic body bag tracking and cleanup.

DespawnSecondsFromDeath

Determines how many seconds a body bag should remain before removal.

Default: 300 seconds (5 minutes).

ExtraBufferSeconds

Additional time used when determining how long death-tracking records should be retained. This does not extend the actual body bag despawn timer.

Default: 180 seconds.

Debug

Enables diagnostic logging for death tracking, body bag scheduling, and cleanup events.

Default: false.

Performance Optimization

Body Bag Despawn is designed for busy, modded Rust servers where large numbers of dropped containers can accumulate.

The plugin includes:

  • A single global cleanup timer running once per second.
  • Dictionary-based tracking of pending body bags.
  • Cached prefab IDs for efficient entity identification.
  • Reusable collections to reduce repeated allocations.
  • Automatic removal of expired tracking records.
  • Minimal processing when no body bags are scheduled for cleanup.

This approach avoids creating individual repeating timers for every dropped bag.

Installation

  1. Download BodyBagDespawn.cs.
  2. Upload it to your Rust server's oxide/plugins directory.
  3. Allow Oxide/uMod to compile and load the plugin.
  4. Edit the generated configuration file at oxide/config/BodyBagDespawn.json.
  5. Reload the plugin after making configuration changes.

To reload manually:

oxide.reload BodyBagDespawn

Commands & Permissions

No chat commands, console commands, or permissions are required.

The plugin operates automatically once loaded and enabled.

Compatibility

  • Game: Rust
  • Framework: Oxide/uMod
  • Plugin Version: 1.3.1
  • Tracked Entity: item_drop_backpack
  • Configuration: JSON
  • Dependencies: No additional plugin dependencies declared

Important Notes

  • Body bags are removed regardless of their remaining inventory contents.
  • The plugin targets dropped backpack entities, not every type of loot container.
  • Death-based timing depends on successfully associating the bag's owner ID with a tracked corpse.
  • Existing bags are not automatically scanned when the plugin loads.
  • Pending timers are not persisted across plugin reloads or server restarts.
  • The configured despawn duration is enforced with approximately one-second timer resolution.

Body Bag Despawn is an efficient, configurable solution for automatically removing abandoned body bags and maintaining a cleaner Rust server environment.

You may also like