mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-24 15:23:20 +02:00
add fixed keepxp.
This commit is contained in:
@@ -134,6 +134,17 @@ public class EssentialsEntityListener implements Listener
|
||||
event.setDeathMessage("");
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.LOW)
|
||||
public void onPlayerDeathExpEvent(final PlayerDeathEvent event)
|
||||
{
|
||||
final IUser user = ess.getUser(event.getEntity());
|
||||
if (Permissions.KEEPXP.isAuthorized(user))
|
||||
{
|
||||
event.setKeepLevel(true);
|
||||
event.setDroppedExp(0);
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.LOW, ignoreCancelled = true)
|
||||
public void onFoodLevelChange(final FoodLevelChangeEvent event)
|
||||
|
@@ -45,6 +45,7 @@ public enum Permissions implements IPermission
|
||||
JOINFULLSERVER,
|
||||
INVSEE_MODIFY,
|
||||
INVSEE_PREVENT_MODIFY,
|
||||
KEEPXP,
|
||||
KICK_EXEMPT,
|
||||
KICK_NOTIFY,
|
||||
LIST_HIDDEN,
|
||||
|
Reference in New Issue
Block a user