Selective Keep Inventory

Choose which players keep their inventory and XP on death with a simple tag. Everyone else drops everything as usual.

English

Selective Keep Inventory lets you decide who keeps their stuff when they die. Players with the tag kd_salvado keep their whole inventory, armor, offhand and experience, exactly like the keepInventory game rule. Everyone else dies the normal way: all their items drop where they died and they leave an experience orb worth 7 points per level, capped at 100, just like vanilla.

Setup takes one command per player (operator or cheats enabled):

  • Protect a player: /tag PlayerName add kd_salvado
  • Remove the protection: /tag PlayerName remove kd_salvado
  • Check a player: /tag PlayerName list

Installation: drop the zip into the datapacks folder of your world (single player: .minecraft/saves/<world>/datapacks/, server: <server>/world/datapacks/), run /reload and check that /datapack list shows it. Tags are stored on the player, so they survive restarts and updates.

Notes:

  • Java Edition 26.2. It does not work on Bedrock or Realms.
  • The datapack turns on the keep_inventory game rule in every dimension and handles the drops itself. To uninstall, remove the zip and run /gamerule keep_inventory false.
  • Do not enable immediate_respawn: the drops are created at the place where the player died, before respawning.
  • Items with Curse of Vanishing are dropped instead of destroyed for unprotected players.
  • No mods or plugins required; it also works on Paper, Fabric and Forge servers.

Español

Selective Keep Inventory te deja elegir quién conserva sus cosas al morir. Los jugadores con la etiqueta kd_salvado conservan todo el inventario, la armadura, la mano secundaria y la experiencia, igual que con la regla keepInventory. El resto muere de forma normal: sueltan todos sus objetos donde murieron y dejan un orbe de experiencia de 7 puntos por nivel, con un máximo de 100, como en vanilla.

Se configura con un comando por jugador (siendo operador o con trucos activados):

  • Proteger a un jugador: /tag NombreJugador add kd_salvado
  • Quitar la protección: /tag NombreJugador remove kd_salvado
  • Comprobar a un jugador: /tag NombreJugador list

Instalación: copia el zip en la carpeta datapacks del mundo (un jugador: .minecraft/saves/<mundo>/datapacks/, servidor: <servidor>/world/datapacks/), escribe /reload y comprueba que sale en /datapack list. Las etiquetas se guardan en el jugador, así que se mantienen al reiniciar y al actualizar.

Notas:

  • Java Edition 26.2. No funciona en Bedrock ni en Realms.
  • El datapack activa la regla keep_inventory en todas las dimensiones y gestiona él mismo lo que se suelta. Para desinstalarlo, quita el zip y escribe /gamerule keep_inventory false.
  • No actives immediate_respawn: los objetos aparecen donde murió el jugador, antes de reaparecer.
  • Los objetos con Maldición de desaparición se sueltan en vez de destruirse para los jugadores no protegidos.
  • No necesita mods ni plugins; también funciona en servidores Paper, Fabric y Forge.

Selective Keep Inventory Team

profile avatar
Owner
  • 9
    Projects
  • 4.7K
    Downloads

More from trripe1View all