FoodLevelChange event, update.

This commit is contained in:
KHobbits 2011-10-04 09:05:04 +01:00
parent 608ebfdb4a
commit 0297d22fac

View File

@ -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);
}
}
}