Description
DeadPetRevive is a simple and lightweight plugin for Spigot/Paper 1.21 that prevents players from permanently losing their tamed pets. Whenever a tamed mob dies, its essential data (type, custom name) is stored so players can bring their pet back to life later using a special item.
Features
- Automatic Pet Saving
When a tamed pet (wolf, cat, etc.) owned by a player dies, its type and name (if any) are stored for future revival.
- Revival Item
A customizable “Revive Pet Bone” item that, when used, resurrects the next stored pet at the player’s location.
- Configurable Messages & Item
All messages (e.g., “pet stored,” “revival successful,” “no pets to revive”) and the bone’s appearance (material, name, lore, amount) can be adjusted in config.yml.
- Persistent Storage
Dead-pet data is saved in a simple YAML file (deadpets.yml), ensuring pet information remains intact across restarts.
- Dynamic Reload
Reload both config.yml and the dead-pet database without restarting the server.
Installation
- Download
- Download the precompiled DeadPetRevive-1.0.jar.
- Place in Plugins Folder
- Copy DeadPetRevive-1.0.jar into your server’s plugins/ directory.
- Start the Server
- Launch or restart your Spigot/Paper 1.21.x server.
- On first run, the plugin will generate:
- plugins/DeadPetRevive/config.yml
- plugins/DeadPetRevive/deadpets.yml
- Customize Configuration
- Open config.yml to adjust item settings, messages, and permission nodes.
Commands
Command
Permission
Description
/giverevivebone deadpetrevive.use Gives the player one “Revive Pet Bone.”
/deadpetrevive reload deadpetrevive.reload Reloads config.yml and deadpets.yml on-the-fly.
- Players without the required permission will receive a “no permission” message.
Permissions
- deadpetrevive.use
Allows use of /giverevivebone and consumption of the revival item.
- deadpetrevive.reload
Allows use of /deadpetrevive reload to refresh configuration and data files.
Configuration (config.yml)
#############################################
# DeadPetRevive – Configuration Reference #
#############################################
# Revive Item Settings ---------------------------------
revive-item:
material: BONE
display-name: "&aRevive Pet Bone"
amount: 1
# Messages (supports '&' color codes and %type%) -------
messages:
death-stored: "&eYour pet (%type%) has been stored for revival."
no-dead-pets: "&cYou have no stored pets to revive."
revive-success: "&aYou have revived your pet (%type%)!"
invalid-entity: "&cStored entity is not revivable and has been removed."
reload-success: "&aConfiguration reloaded successfully."
no-permission: "&cYou do not have permission to do that."
# Permission Nodes --------------------------------------
permissions:
givebone: deadpetrevive.use
reload: deadpetrevive.reload
# Additional Settings -----------------------------------
settings:
debug: false
data-file: "deadpets.yml"
- revive-item.material
The Bukkit material for the revival item (e.g., BONE, BONE_BLOCK, etc.).
- revive-item.display-name
The name shown on the item in-game; use & for color codes.
- revive-item.amount
Number of bones given when running /giverevivebone.
- Messages Section
Customize each message. %type% is replaced with the pet’s entity type (wolf, cat, etc.).
- Permissions Section
Default nodes used by the plugin. Adjust as needed for your group/permission system.
- settings.debug
If set to true, plugin will print extra debug information to the console.
- settings.data-file
Filename for the YAML file that stores dead-pet data (deadpets.yml by default).
Example Usage
- Acquire the Bone
/giverevivebone
- Receives a “Revive Pet Bone” in your hotbar.
- Lose a Pet
- Tame a wolf or cat, let it die (e.g., from fall damage or a hostile mob).
- You’ll see a chat message:
Your pet (wolf) has been stored for revival.
- Revive the Pet
- Right-click with the “Revive Pet Bone” in your main hand.
- The next stored pet (FIFO order) appears at your feet, with its original name (if any), and the bone is consumed.
- You’ll see:
You have revived your pet (wolf)!
- Reload Configuration
/deadpetrevive reload
- Reloads both config.yml and deadpets.yml.
- Requires deadpetrevive.reload permission.
- Confirmation message:
Configuration reloaded successfully.
Changelog
1.0
- Initial release: Automatic dead-pet storage, revival item, configurable messages, reload command.
Support & Feedback