From 33c6fc1f1f8d1596bbdaa442c9dc1bc7d9fe205f Mon Sep 17 00:00:00 2001 From: snowleo Date: Thu, 22 Sep 2011 10:47:39 +0200 Subject: Missing file for last commit --- .../src/com/earth2me/essentials/EssentialsEntityListener.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Essentials/src/com/earth2me/essentials/EssentialsEntityListener.java b/Essentials/src/com/earth2me/essentials/EssentialsEntityListener.java index ce97726dc..2eda73540 100644 --- a/Essentials/src/com/earth2me/essentials/EssentialsEntityListener.java +++ b/Essentials/src/com/earth2me/essentials/EssentialsEntityListener.java @@ -8,6 +8,7 @@ import org.bukkit.event.entity.EntityDamageByEntityEvent; import org.bukkit.event.entity.EntityDamageEvent; import org.bukkit.event.entity.EntityDeathEvent; import org.bukkit.event.entity.EntityListener; +import org.bukkit.event.entity.FoodLevelChangeEvent; import org.bukkit.inventory.ItemStack; @@ -80,4 +81,13 @@ public class EssentialsEntityListener extends EntityListener } } } + + @Override + public void onFoodLevelChange(FoodLevelChangeEvent event) + { + if (event.getEntity() instanceof Player && ess.getUser(event.getEntity()).isGodModeEnabled()) + { + event.setFoodLevel(20); + } + } } -- cgit v1.2.3