mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-01-10 18:38:18 +01:00
add essentials.keepxp to allow a player to keep their level after death.
This commit is contained in:
parent
4d17b73291
commit
3b25235755
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user