summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Pioch <lukas@zgow.de>2017-03-18 21:45:28 +0100
committerGitHub <noreply@github.com>2017-03-18 21:45:28 +0100
commit2b46a32a216dad5ef58e44d02e4bc7a45d9e7c13 (patch)
tree632b84d3cc854a725cbf45bcd1c0195e636355e8
parentFixed looping when unable to bind port (#3621) (diff)
parentBoat spawned, remove it from player's hand (diff)
downloadcuberite-2b46a32a216dad5ef58e44d02e4bc7a45d9e7c13.tar
cuberite-2b46a32a216dad5ef58e44d02e4bc7a45d9e7c13.tar.gz
cuberite-2b46a32a216dad5ef58e44d02e4bc7a45d9e7c13.tar.bz2
cuberite-2b46a32a216dad5ef58e44d02e4bc7a45d9e7c13.tar.lz
cuberite-2b46a32a216dad5ef58e44d02e4bc7a45d9e7c13.tar.xz
cuberite-2b46a32a216dad5ef58e44d02e4bc7a45d9e7c13.tar.zst
cuberite-2b46a32a216dad5ef58e44d02e4bc7a45d9e7c13.zip
-rw-r--r--src/Items/ItemBoat.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Items/ItemBoat.h b/src/Items/ItemBoat.h
index 5f7f91b57..be1663eef 100644
--- a/src/Items/ItemBoat.h
+++ b/src/Items/ItemBoat.h
@@ -98,6 +98,12 @@ public:
cBoat * Boat = new cBoat(x + 0.5, y + 0.5, z + 0.5);
Boat->Initialize(*a_World);
+ // Remove boat from players hand
+ if (!a_Player->IsGameModeCreative())
+ {
+ a_Player->GetInventory().RemoveOneEquippedItem();
+ }
+
return true;
}
} ;