mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-08-05 20:12:54 +00:00
Recommit Keep Exp on death permission
Permission: essentials.keepxp Code by Iaccidentially.
This commit is contained in:
parent
41235b6ee1
commit
cfc8faa43a
1 changed files with 11 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue