Перейти к содержимому
Mineforgian

partialkeepinv

Keeps shulker boxes, container items (ender chests, bundles) and all non-stackable gear (tools, weapons, armour, elytra, etc.) on death while everything else drops normally. Adds configurable 1–5 level XP loss and light armour durability damage on each dea

Загрузки
233
Подписчики
2
Обновлён
31 декабря 2025 г.
Лицензия
MIT

Опубликован 23 ноября 2025 г.

partialkeepinv

Partial Keep Inventory introduces a softer alternative to /gamerule keepInventory for Paper 1.21.x servers (tested on 1.21.11).
Instead of keeping everything or dropping everything, it selectively protects valuable items while still punishing deaths.

Core features

  • Selective item keeping

    • Keeps all shulker boxes (any colour).
    • Keeps all non-stackable items – tools, weapons, armour, elytra, etc. (anything with max stack size 1).
    • Keeps extra container-like items such as ender chests and bundles (and anything else you add to the whitelist in config.yml).
    • All other items (blocks, food, stackables) drop normally on death.
  • Inventory position preserved

    • Kept items are restored to their original inventory slots (hotbar and main inventory).
    • Off-hand item is restored to the off-hand slot when possible.
    • If a slot is already occupied (because of other plugins or edge cases), the item is added to the inventory and dropped at the player’s feet if there’s no space.
  • Armour handling

    • Armour is kept and re-equipped automatically on respawn.
    • Each death applies extra durability damage to each worn armour piece (default ~3% of max durability, configurable).
    • Items won’t be instantly destroyed by the death penalty (at least 1 durability is preserved).
  • XP penalty

    • On every death the player loses a configurable number of XP levels (default 1–5, never below level 0).
    • No XP orbs are dropped; the plugin directly sets the new level on respawn.

Configuration

  • keep.shulkers, keep.non_stackable_items, keep.containers – toggle what types of items are protected.
  • containers.material_whitelist – list extra container-like materials to always keep (default: ENDER_CHEST, BUNDLE).
  • xp_loss.enabled, xp_loss.min_levels, xp_loss.max_levels – control how many levels are lost on death.
  • armor_damage.enabled, armor_damage.percent – control whether and how much armour durability is lost per death.

Requirements

  • Server: Paper 1.21.11+ (should work on other 1.21.x builds).
  • Java: 21+
  • Make sure in each relevant world:
    /gamerule keepInventory false
    

Ченджлог

1.0.2Бета1.21.11 · 31 декабря 2025 г.

1.0.2 – Paper 1.21.11 update

  • Rebuilt against the Paper 1.21.11 API.
  • Marked compatibility with Minecraft 1.21.11 on Modrinth.
  • No functional changes: behaviour and config are the same as 1.0.1
    (keeps shulkers, containers and non-stackable items, XP loss and armour wear).

To update: just replace the old jar with parialkeepinv-1.0.2.jar and restart. Existing config.yml will continue to work.

1.0.1Бета1.21.8, 1.21.9, 1.21.10 · 24 ноября 2025 г.

1.0.1 – Config & container keep update

New features

  • Added a config.yml to control behaviour without recompiling:

    • keep.shulkers – toggle keeping shulker boxes on death.
    • keep.non_stackable_items – toggle keeping all non-stackable items (tools, weapons, armour, elytra, etc.).
    • keep.containers – toggle keeping extra container-like items (see whitelist below).
    • xp_loss.enabled, xp_loss.min_levels, xp_loss.max_levels – configure how many XP levels are lost on death.
    • armor_damage.enabled, armor_damage.percent – configure whether armour takes extra durability damage on death and by what percentage.
  • Introduced a container whitelist:

    • New containers.material_whitelist section in config.yml.
    • By default includes: ENDER_CHEST and BUNDLE.
    • Any material listed here is always kept on death (as long as keep.containers is true), so items that store or access other items are preserved.

Behaviour fixes / improvements

  • Fixed an issue where ender chests (and other stackable “container-type” items) were not kept on death.
  • Settings are logged on startup so you can easily see which options are active.

Notes for updaters from 1.0-SNAPSHOT

  • If you already had a config.yml from the previous version, it will not be overwritten.
    • You should either:
      • Delete the old plugins/parialkeepinv/config.yml and let the plugin regenerate it, or
      • Manually add the xp_loss and armor_damage sections (and containers.material_whitelist) to your existing config.
  • New installs get the full config with all sections by default.
1.0.0Релиз1.21.10 · 23 ноября 2025 г.

1.0.0 – Initial release

  • Added partial keep inventory system for Paper 1.21.10:

    • Keeps all shulker boxes and all non-stackable items (tools, weapons, armour, elytra, etc.) on death.
    • All other items (blocks, food, stackables) still drop normally.
  • Implemented slot-preserving restore:

    • Kept items are restored to their original inventory slots (hotbar + main inventory).
    • Off-hand item is restored when possible.
    • Armour is automatically re-equipped on respawn.
  • Added death penalties to keep risk:

    • Player loses a random 1–5 XP levels on each death (no XP orbs dropped).
    • Each worn armour piece takes about 3% of its max durability damage per death (cannot break purely from the death penalty; at least 1 durability is left).
  • No commands, no permissions, no external dependencies.
    Requires Paper 1.21.10+ and Java 21+, with /gamerule keepInventory false in worlds where you want this behaviour.

Комментарии

Загружаем…