SmartKillLoot - Last-Hit PvP Loot Transfer icon

SmartKillLoot - Last-Hit PvP Loot Transfer -----

Automatically sends PvP death drops to the final attacker, sorting valuable loot first.



smartkillloot-hero-spigot.jpg

smartkillloot-features-spigot.jpg

SmartKillLoot
Last-hit PvP loot transfer with smart priority sorting

SmartKillLoot is a lightweight PvP-focused plugin for Spigot/Paper 1.21.x. When a player kills another player, the victim's death drops are not scattered randomly on the ground. Instead, the loot is transferred directly into the inventory of the last valid attacker.

If the killer's inventory is full, SmartKillLoot sorts the drops by value first. Rare and important items such as netherite gear, elytra, totems, shulker boxes, diamonds, enchanted golden apples and other valuable items are tried first. Low-priority junk such as dirt, cobblestone, netherrack, rotten flesh and seeds is left for the ground only when there is no room.

Why use it?
  • Last hit wins: Designed for real PvP situations where several players attack the same target.
  • Not just Bukkit getKiller(): SmartKillLoot tracks the last valid combat hit itself.
  • Projectile support: Bows, crossbows, tridents, snowballs, eggs and potion projectiles can credit the shooter.
  • Optional pet support: Tamed wolf/pet damage can credit the owner when enabled.
  • Smart item priority: Important gear is protected before junk when inventory space is limited.
  • Dupe-safe transfer flow: Uses PlayerDeathEvent drops as the source, clears original drops before transfer, then only drops true leftovers.
  • Configurable behavior: Worlds, permissions, keepInventory handling, messages, priority scores and leftovers are configurable.

How it works
  1. A player damages another player.
  2. SmartKillLoot records the attacker, victim, timestamp, damage cause and damage amount.
  3. When the victim dies, the plugin checks if the last hit is still inside the configured combat timeout.
  4. The final valid attacker receives the loot.
  5. Drops are sorted by priority before insertion into the killer's inventory.
  6. Items that do not fit are dropped naturally at the configured location.

Supported last-hit sources
  • Direct melee player damage
  • Projectile damage from a player shooter
  • Bow and crossbow shots
  • Thrown tridents
  • Snowballs and eggs
  • Splash/lingering potion projectiles
  • Tamed wolf/pet damage when enabled in config

Priority system
SmartKillLoot calculates a priority score for every death drop. Higher score items are inserted first.

High priority examples:
  • Elytra
  • Totem of Undying
  • Netherite armor, tools and weapons
  • Diamond armor, tools and weapons
  • Mace, trident, shield, bow and crossbow
  • Shulker boxes, including colored shulker boxes
  • Enchanted golden apples and golden apples
  • Diamonds, emeralds, netherite ingots, ancient debris and other valuables

Low priority examples:
  • Dirt
  • Cobblestone
  • Netherrack
  • Rotten flesh
  • Seeds and other junk materials

The scoring system also considers enchantments, total enchantment levels, custom names, lore, custom model data, shulker box contents and optional durability penalties.

Commands
Code (Text):
/smartkillloot reload
/skl reload
Reloads config.yml and messages.yml.

Code (Text):
/smartkillloot debug
/skl debug
Toggles runtime debug logging.

Code (Text):
/smartkillloot priority
/skl priority
Shows the priority score of the item in your main hand. Useful for balancing custom priority settings.

Code (Text):
/smartkillloot status
/skl status
Shows plugin enabled state, debug state, active combat record count and combat timeout.

Permissions
Code (Text):
smartkillloot.admin
Allows admin commands. Default: OP.

Code (Text):
smartkillloot.bypass.victim
Players with this permission keep vanilla drop behavior when they die.

Code (Text):
smartkillloot.bypass.killer
Players with this permission do not receive transferred loot.

Main configuration options
Code (Text):
enabled: true
debug: false

combat:
  timeout-seconds: 15
  track-projectiles: true
  track-tamed-wolves: true
  credit-environment-death-after-player-hit: true
  ignore-self-damage: true

death:
  respect-keep-inventory: true
  leftover-drop-location: VICTIM_LOCATION
  offline-killer-behavior: VANILLA
  require-killer-online: true
  prevent-transfer-if-killer-dead: true

priority:
  tie-breaker: KEEP_ORIGINAL_ORDER
World control: Use BLACKLIST or WHITELIST mode to disable or enable SmartKillLoot per world.

Keep inventory: By default, SmartKillLoot respects keepInventory and does not transfer loot when keepInventory is active.

Leftover location: Leftovers can drop at the victim location or the killer location.

Messages: messages.yml supports color codes and placeholders such as {killer}, {victim}, {transferred}, {dropped}, {total} and {world}.

Installation
  1. Download SmartKillLoot.
  2. Place the jar file into your server's plugins folder.
  3. Restart the server.
  4. Edit config.yml if needed.
  5. Use /skl reload after changing config or messages.

Compatibility
  • Minecraft: 1.21.x
  • Server software: Spigot and Paper
  • Java: 21
  • Dependencies: none
  • NMS/reflection: not used

Dupe safety notes
SmartKillLoot is built around Bukkit's PlayerDeathEvent drop list. It does not manually duplicate the victim inventory. Once transfer begins, the original event drops are cleared and only real inventory overflow is dropped back into the world.

Manual tests to try
  • Player A kills Player B and receives B's drops.
  • A's inventory is full; valuable gear enters first and junk drops.
  • Player C lands the final hit and receives the loot, even if A dealt more damage.
  • Bow, trident and potion final hits credit the shooter.
  • keepInventory true keeps vanilla/keepInventory behavior by default.
  • Disabled worlds keep vanilla drop behavior.
  • Bypass permissions keep vanilla drop behavior.
  • Items should never appear both in the killer inventory and on the ground.

Version
1.0.0 - Initial release.
Resource Information
Author:
----------
Total Downloads: 6
First Release: Jun 8, 2026
Last Update: Jun 8, 2026
Category: ---------------
All-Time Rating:
0 ratings
Version -----
Released: --------------------
Downloads: ------
Version Rating:
----------------------
-- ratings