summaryrefslogtreecommitdiffstats
path: root/src/Entities/Player.cpp
diff options
context:
space:
mode:
authorAlexander Harkness <me@bearbin.net>2018-01-06 01:39:23 +0100
committerpeterbell10 <peterbell10@live.co.uk>2018-01-06 01:39:23 +0100
commit2529a898351c4b7c6372570ba53a7e25678980a9 (patch)
treef87099d4a2374bb67fad1aa35ed472eb0af05ddf /src/Entities/Player.cpp
parentImproved fishing rewards (#4120) (diff)
downloadcuberite-2529a898351c4b7c6372570ba53a7e25678980a9.tar
cuberite-2529a898351c4b7c6372570ba53a7e25678980a9.tar.gz
cuberite-2529a898351c4b7c6372570ba53a7e25678980a9.tar.bz2
cuberite-2529a898351c4b7c6372570ba53a7e25678980a9.tar.lz
cuberite-2529a898351c4b7c6372570ba53a7e25678980a9.tar.xz
cuberite-2529a898351c4b7c6372570ba53a7e25678980a9.tar.zst
cuberite-2529a898351c4b7c6372570ba53a7e25678980a9.zip
Diffstat (limited to '')
-rw-r--r--src/Entities/Player.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Entities/Player.cpp b/src/Entities/Player.cpp
index 71f7b582f..073d00909 100644
--- a/src/Entities/Player.cpp
+++ b/src/Entities/Player.cpp
@@ -678,6 +678,10 @@ void cPlayer::FinishEating(void)
{
return;
}
+ if (!IsGameModeCreative())
+ {
+ GetInventory().RemoveOneEquippedItem();
+ }
ItemHandler->OnFoodEaten(m_World, this, &Item);
}