1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-01-19 06:08:00 +01:00

Missing file for last commit

This commit is contained in:
snowleo 2011-09-22 10:47:39 +02:00
parent 18dcbc2ce7
commit 7bcafee89f

View File

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