From 4f4400970b8a4a4e5fb6596b31becc1ae23a5928 Mon Sep 17 00:00:00 2001 From: CraftBukkit/Spigot Date: Thu, 15 Sep 2011 06:24:45 +0100 Subject: [PATCH] Implemented food methods + fixed dying resetting food By: Dinnerbone --- .../craftbukkit/entity/CraftPlayer.java | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java index 86eeb82e06..8076fa0800 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -424,4 +424,28 @@ public class CraftPlayer extends CraftHumanEntity implements Player { getHandle().exp = getTotalExperience(); } } + + public float getExhaustion() { + return getHandle().V().c; + } + + public void setExhaustion(float value) { + getHandle().V().c = value; + } + + public float getSaturation() { + return getHandle().V().b; + } + + public void setSaturation(float value) { + getHandle().V().b = value; + } + + public int getFoodLevel() { + return getHandle().V().a; + } + + public void setFoodLevel(int value) { + getHandle().V().a = value; + } }