mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-01-11 02:47:52 +01:00
Recommit Keep Exp on death permission
Permission: essentials.keepxp Code by Iaccidentially.
This commit is contained in:
parent
41235b6ee1
commit
cfc8faa43a
@ -119,6 +119,17 @@ public class EssentialsEntityListener implements Listener
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@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);
|
||||||
|
event.setDroppedExp(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@EventHandler(priority = EventPriority.LOW, ignoreCancelled = true)
|
@EventHandler(priority = EventPriority.LOW, ignoreCancelled = true)
|
||||||
public void onFoodLevelChange(final FoodLevelChangeEvent event)
|
public void onFoodLevelChange(final FoodLevelChangeEvent event)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user