Home›Java›Mods›DeathDropsAPI
Using multiple death drops related plugins may easily cause conflict, for developers, it is not easy to fit their death drops plugin with some other related plugins perfectly.
So I wrote this plugin to make it easier to have multiple death drops plugins :)
It is strongly recommended to remove all other plugins that modifies death drops.
Plugins using DeathDropsAPI:
Locked Items (trade blocker)
Commands: none yet
Permissions:
+ deathdropsapi.keep: Keep all player's items when they die, no event will be fired
Usage:
Main event: PlayerDeathDropEvent
This event will be fired multiple times when a player dies, each event represents to a ItemStack in their inventory. For example, a player have 3 items in their inventory and they die, 3 events will be fired. If the event is cancelled, that item will not be dropped and will be kept in player's inventory when they die, set the item to null to remove that item from player's inventory.
If you want to drop other items that are not in player's inventory, simply listen to PlayerDeathEvent then world.dropItemNaturaly
Sample code:
(this will keep player's inventory and rename all player's items to "Kept item")
Code (Java):

@EventHandler (ignoreCancelled = true )
public void onDeathDrop (PlayerDeathDropEvent e ) {
ItemStack item = e. getItem ( ) ;
item. getItemMeta ( ). setDisplayName ( "Kept item" ) ;
//No worries if the item is null, since this event only fired with a valid item
e. setItem (item ) ;
e. setCancelled ( true ) ;
}
 
For server admins: If you want a plugin that modifies death drops using this API, just leave a suggestion in discussion section :)
Quick facts

Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.

DeathDropsAPI is a free Minecraft Java mod. Compatible with Minecraft 1.7, 1.8, 1.9, 1.10 and newer. Downloaded 4,927 times (via Spigot). Download it and open it directly in the game.

Explore more