Dead bodies in Minecraft for 1.8–26.2 servers.
- Install PacketEvents 2.13.0 or newer (required for Minecraft 26.2).
- Drop this jar into
plugins. - Restart the server (do not use
/reload). Use/corpse reloadafterwards to apply config/message changes.
| Command | Permission | Description |
|---|---|---|
/corpse spawn [player] |
corpses.spawn |
Spawns your corpse at your feet, or another player’s if you give a name. |
/corpse remove <radius> |
corpses.remove |
Removes all corpses within the given radius. |
/corpse reload |
corpses.reload |
Reloads config.yml and messages.yml. Works from console. |
corpse-time– Seconds before a corpse despawns (-1= never). Leftover loot is dropped on the ground.on-death– Spawn a corpse when a player dies.show-tags– Show name tags above corpses.render-armor– Render armor/items on the corpse.corpse-distance– Max blocks at which corpses are visible.lootable-corpses– Right-click to open inventory and loot.despawn-when-empty– Despawn a lootable corpse when its inventory is empty.loot-click-range– How close a ground click must be to open loot.worlds– World names where corpses spawn on death (empty = all). Commands still work everywhere.entity-pose– Pose used for the corpse entity (SLEEPINGorSWIMMING).
Existing config.yml / messages.yml files are not overwritten. New keys use built-in defaults until you add them yourself.
All command and loot text is configurable. Use & color codes. {amount} is replaced in corpses-deleted.
Add the dependency (e.g. JitPack) and use the builder API via Corpse.fromPlayer() or Corpse.fromLocation():
import com.github.denmeh.corpse.corpse.Corpse;
import com.github.denmeh.corpse.model.CorpseArmor;
// At player location, with their skin and armor
Corpse corpse = Corpse.fromPlayer(player).spawn();
// At a specific location
Corpse corpse = Corpse.fromPlayer(player).location(location).spawn();
Corpse corpse = Corpse.fromLocation(location).name(offlinePlayer.getName()).spawn();
// Custom armor (use CorpseArmor)
CorpseArmor armor = new CorpseArmor().boots(boots).leggings(leggings).chestplate(chestplate).helmet(helmet);
Corpse corpse = Corpse.fromPlayer(player).location(location).armor(armor).spawn();
Corpse corpse = Corpse.fromLocation(location).name(name).armor(armor).spawn();
// Remove a corpse
corpse.destroy();The builder also supports .textures(List<TextureProperty>) for custom skins. Listen for right-clicks and attacks on corpses via AsyncCorpseInteractEvent; use getAction() to distinguish interact vs attack.