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:
parent
18dcbc2ce7
commit
7bcafee89f
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user