Hunger now takes longer to decrease
This commit is contained in:
parent
dd2418232c
commit
eb7e68885b
@ -29,6 +29,7 @@ import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.HandlerList;
|
||||
import org.bukkit.event.Listener;
|
||||
import org.bukkit.event.entity.EntityDamageEvent;
|
||||
import org.bukkit.event.entity.FoodLevelChangeEvent;
|
||||
import org.bukkit.event.hanging.HangingBreakEvent;
|
||||
import org.bukkit.event.hanging.HangingPlaceEvent;
|
||||
import org.bukkit.event.player.PlayerInteractEntityEvent;
|
||||
@ -892,6 +893,12 @@ public abstract class Game implements Listener
|
||||
return Manager.IsTeamBalance() ? team.GetSize() < Math.max(1, UtilServer.getPlayers().length / GetTeamList().size()) : true;
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public final void onFoodLevelChangeEvent(FoodLevelChangeEvent event)
|
||||
{
|
||||
((Player) event.getEntity()).setSaturation(3.8F); // While not entirely accurate, this is a pretty good guess at original food level changes
|
||||
}
|
||||
|
||||
public GameTeam GetTeamPreference(Player player)
|
||||
{
|
||||
for (GameTeam team : _teamPreference.keySet())
|
||||
|
Loading…
Reference in New Issue
Block a user