summaryrefslogtreecommitdiffstats
path: root/source/ClientHandle.cpp
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2013-07-28 22:55:09 +0200
committermadmaxoft <github@xoft.cz>2013-07-28 22:55:09 +0200
commit3bf4130e3fc05f84cf7be7e33656f3e29f0fe12c (patch)
tree2294350370ff68bfe9c778ef1296506f1a6b0ff0 /source/ClientHandle.cpp
parentIgnoring all items beginning with "world". (diff)
downloadcuberite-3bf4130e3fc05f84cf7be7e33656f3e29f0fe12c.tar
cuberite-3bf4130e3fc05f84cf7be7e33656f3e29f0fe12c.tar.gz
cuberite-3bf4130e3fc05f84cf7be7e33656f3e29f0fe12c.tar.bz2
cuberite-3bf4130e3fc05f84cf7be7e33656f3e29f0fe12c.tar.lz
cuberite-3bf4130e3fc05f84cf7be7e33656f3e29f0fe12c.tar.xz
cuberite-3bf4130e3fc05f84cf7be7e33656f3e29f0fe12c.tar.zst
cuberite-3bf4130e3fc05f84cf7be7e33656f3e29f0fe12c.zip
Diffstat (limited to 'source/ClientHandle.cpp')
-rw-r--r--source/ClientHandle.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/ClientHandle.cpp b/source/ClientHandle.cpp
index a15facc6e..d66e47d32 100644
--- a/source/ClientHandle.cpp
+++ b/source/ClientHandle.cpp
@@ -801,6 +801,11 @@ void cClientHandle::HandleRightClick(int a_BlockX, int a_BlockY, int a_BlockZ, c
}
else if (ItemHandler->IsFood())
{
+ if (m_Player->IsSatiated())
+ {
+ // The player is satiated, they cannot eat
+ return;
+ }
m_Player->StartEating();
if (PlgMgr->CallHookPlayerEating(*m_Player))
{