mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-12-26 11:07:55 +01:00
FoodLevelChange event, update.
This commit is contained in:
parent
608ebfdb4a
commit
0297d22fac
@ -84,10 +84,12 @@ public class EssentialsEntityListener extends EntityListener
|
||||
|
||||
@Override
|
||||
public void onFoodLevelChange(FoodLevelChangeEvent event)
|
||||
{
|
||||
{
|
||||
if (event.getEntity() instanceof Player && ess.getUser(event.getEntity()).isGodModeEnabled())
|
||||
{
|
||||
{
|
||||
//TODO: Remove the following line, when we're happy to remove backwards compatability with 1185.
|
||||
event.setFoodLevel(20);
|
||||
event.setCancelled(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user