diff --git a/Essentials/src/com/earth2me/essentials/EssentialsEntityListener.java b/Essentials/src/com/earth2me/essentials/EssentialsEntityListener.java index 8e2c4dc69..ed67a2eb2 100644 --- a/Essentials/src/com/earth2me/essentials/EssentialsEntityListener.java +++ b/Essentials/src/com/earth2me/essentials/EssentialsEntityListener.java @@ -159,6 +159,14 @@ public class EssentialsEntityListener implements Listener { } } + @EventHandler(priority = EventPriority.LOW) + public void onPlayerDeathInvEvent(final PlayerDeathEvent event) { + final User user = ess.getUser(event.getEntity()); + if (user.isAuthorized("essentials.keepinv")) { + event.setKeepInventory(true); + } + } + @EventHandler(priority = EventPriority.LOW, ignoreCancelled = true) public void onFoodLevelChange(final FoodLevelChangeEvent event) { if (event.getEntity() instanceof Player) {