mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-25 07:30:56 +02:00
add fixed keepxp.
This commit is contained in:
@@ -134,6 +134,17 @@ public class EssentialsEntityListener implements Listener
|
|||||||
event.setDeathMessage("");
|
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)
|
@EventHandler(priority = EventPriority.LOW, ignoreCancelled = true)
|
||||||
public void onFoodLevelChange(final FoodLevelChangeEvent event)
|
public void onFoodLevelChange(final FoodLevelChangeEvent event)
|
||||||
|
@@ -45,6 +45,7 @@ public enum Permissions implements IPermission
|
|||||||
JOINFULLSERVER,
|
JOINFULLSERVER,
|
||||||
INVSEE_MODIFY,
|
INVSEE_MODIFY,
|
||||||
INVSEE_PREVENT_MODIFY,
|
INVSEE_PREVENT_MODIFY,
|
||||||
|
KEEPXP,
|
||||||
KICK_EXEMPT,
|
KICK_EXEMPT,
|
||||||
KICK_NOTIFY,
|
KICK_NOTIFY,
|
||||||
LIST_HIDDEN,
|
LIST_HIDDEN,
|
||||||
|
Reference in New Issue
Block a user