SmartKillLoot
Last-hit PvP loot transfer with smart priority sorting
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
- A player damages another player.
- SmartKillLoot records the attacker, victim, timestamp, damage cause and damage amount.
- When the victim dies, the plugin checks if the last hit is still inside the configured combat timeout.
- The final valid attacker receives the loot.
- Drops are sorted by priority before insertion into the killer's inventory.
- 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
/skl reload
Code (Text):
/smartkillloot debug
/skl debug
/skl debug
Code (Text):
/smartkillloot priority
/skl priority
/skl priority
Code (Text):
/smartkillloot status
/skl status
/skl status
Permissions
Code (Text):
smartkillloot.admin
Code (Text):
smartkillloot.bypass.victim
Code (Text):
smartkillloot.bypass.killer
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
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
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
- Download SmartKillLoot.
- Place the jar file into your server's plugins folder.
- Restart the server.
- Edit config.yml if needed.
- 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.
Quick facts
- Edition: Minecraft Java
- File type: .jar
- Minecraft version listed: 1.21
- How to install: Install the matching mod loader (Forge, Fabric or NeoForge) for your Minecraft version. → Download the .jar. → Put it in the .minecraft/mods folder and launch that loader profile.
- Where to get it: Opens on Spigot — not every file is mirrored on our own servers.
Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.
SmartKillLoot - Last-Hit PvP Loot Transfer is a free Minecraft Java mod. Compatible with Minecraft 1.21. Downloaded 15 times (via Spigot). Download it and open it directly in the game.