RecoverMobs

Did you accidentally kill all the mobs with /kill? It's now recoverable

376

Quick challenge

How far can you run before the mobs catch you?

RecoverMobs

A Minecraft plugin that automatically saves mob data and allows recovery of dead mobs with comprehensive entity information preservation.

Features

- NBT Data: Saves all mobs in loaded chunks at configurable intervals - NBT Data: Each world gets its own JSON file (e.g., `world_mobs.json`, `the_end_mobs.json`) - NBT Data: Configure which mobs to save or exclude - NBT Data: Each mob gets a unique ID for selective spawning - NBT Data: - `/recovermobs` - Recover all mobs in a world - `/recovermob spawn <ID> [x] [y] [z] [world]` - Spawn specific mob by ID at custom location - `/recovermob recover <ID>` - Recover specific mob to original location - `/recovermob listmobs` - List all saved mobs with IDs - `/recovermob reload` - Reload plugin configuration and mob data - NBT Data: Control who can use the recovery commands - NBT Data: Saves and restores comprehensive mob information, including: - NBT Data: Armor, weapons, and items with enchantments and metadata - NBT Data: Health, custom names, glowing effects, etc. - NBT Data: Profession, level, and experience - NBT Data: Persistent data container information

Requirements

- 1.19.4 Java 1.19.4 or newer - 1.19.4 1.19.4 or newer

Installation

1. Download the plugin JAR file 2. Place it in your server's `plugins` folder 3. Restart your server 4. Configure the plugin in `plugins/RecoverMobs/config.yml`

Commands

`/recovermobs [world]`

Recovers all saved mobs for a specific world.

Usage: - `/recovermobs` - Shows available worlds with saved data - `/recovermobs <world>` - Recovers mobs in the specified world

Examples: - `/recovermobs world` - Recovers mobs in the "world" dimension - `/recovermobs the_end` - Recovers mobs in the End dimension - `/recovermobs world_nether` - Recovers mobs in the Nether dimension

`/recovermob <subcommand>`

Manages individual mobs with various subcommands.

`/recovermob spawn <ID> [x] [y] [z] [world]`

Spawns a specific mob by its unique ID at a custom location.

Usage: - `/recovermob spawn <ID>` - Spawns a mob at your current location - `/recovermob spawn <ID> <x> <y> <z>` - Spawns mob at specified coordinates - `/recovermob spawn <ID> <x> <y> <z> <world>` - Spawns mob at coordinates in specific world

Examples: - `/recovermob spawn abc123-def456` - Spawns a mob at your location - `/recovermob spawn abc123-def456 100 64 -200` - Spawns mob at coordinates - `/recovermob spawn abc123-def456 100 64 -200 world_nether` - Spawns in Nether

`/recovermob recover <ID>`

Recovers a specific mob to its original saved location.

Usage: - `/recovermob recover <ID>` - Recovers mob to its original location

Examples: - `/recovermob recover abc123-def456` - Recovers mob to where it was originally saved

`/recovermob listmobs [page]`

Lists all saved mobs with their IDs and information.

Usage: - `/recovermob listmobs` - Shows first page of saved mobs - `/recovermob listmobs <page>` - Shows specific page of saved mobs

Examples: - `/recovermob listmobs` - Shows first 10 mobs - `/recovermob listmobs 2` - Shows mobs 11-20

`/recovermob reload <type>`

Reloads plugin configuration and/or mob data without restarting the server.

Usage: - `/recovermob reload config` - Reloads only the configuration file - `/recovermob reload mobsdata` - Reloads only the saved mob data from files - `/recovermob reload all` - Reloads both configuration and mob data

Examples: - `/recovermob reload config` - Reloads config.yml changes - `/recovermob reload mobsdata` - Reloads mob data if files were modified externally - `/recovermob reload all` - Reloads everything

Permissions

- `recovermobs.recover` - Allows players to use the `/recovermobs` command (default: op) - `recovermobs.spawn` - Allows players to use the `/recovermob` command (default: op) - `recovermobs.list` - Allows players to use the `/recovermob listmobs` subcommand (default: op) - `recovermobs.reload` - Allows players to use the `/recovermob reload` subcommand (default: op)

Configuration

config.yml

```yaml

How often to save mob data (in seconds)

save-interval: 25

Whitelist of mobs to save (leave empty to save all mobs)

whitelist: - ZOMBIE - SKELETON - CREEPER

Add more mob types as needed

Blacklist of mobs to NOT save

blacklist: - PLAYER - ARMOR_STAND - ITEM_FRAME

Add more mob types as needed

Debug mode (set to true for more detailed logging)

debug: false ```

Whitelist vs Blacklist

- Empty Whitelist: If not empty, only mobs in this list will be saved - Empty Whitelist: Mobs in this list will never be saved, regardless of whitelist - Empty Whitelist: All mobs will be saved (except those in blacklist)

Troubleshooting

1. No saved data: Check your whitelist/blacklist configuration 2. No saved data: Make sure you have the `recovermobs.recover` permission 3. No saved data: Ensure the world name is correct and the world is loaded 4. No saved data: Wait for the save interval or check if mobs exist in loaded chunks

ADS