DeathDropsAPI
1.6Best way to modify player's death drops, aims to replaces all old death drops related plugins.
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")
@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 :)
Similar projects
Plugin →Let Me Despawn
Improves performance by tweaking mob despawn rules. Say bye to pesky unintentional persistent mobs.
26.2MSueta
JourneyMap
Real-time map used for mapping in-game or your browser as you explore.
14.7MSueta
Emotecraft
Create your own emotes in Minecraft.
7.9MSueta
Simple Tpa
A simple tpa plugin which sends requests
5.4MSueta
Common Network
Forge and Fabric Unified Networking Solution
4.7MSueta
Set Home
A lightweight plugin for players to set their homes.
3.8MSueta