add essentials.keepxp to allow a player to keep their level after death.

This commit is contained in:
Iaccidentally 2012-06-24 23:27:30 -04:00
parent 4d17b73291
commit 3b25235755

View File

@ -118,7 +118,15 @@ public class EssentialsEntityListener implements Listener
event.setDeathMessage("");
}
}
@EventHandler(priority = EventPriority.LOW)
public void onPlayerDeathExpEvent(final PlayerDeathEvent event)
{
final User user = ess.getUser(event.getEntity());
if (user.isAuthorized("essentials.keepxp"))
{
event.setKeepLevel(true);
}
}
@EventHandler(priority = EventPriority.LOW, ignoreCancelled = true)
public void onFoodLevelChange(final FoodLevelChangeEvent event)
{