summaryrefslogtreecommitdiffstats
path: root/src/Items/ItemDye.h
diff options
context:
space:
mode:
authorMat <mail@mathias.is>2019-12-30 00:54:37 +0100
committerGitHub <noreply@github.com>2019-12-30 00:54:37 +0100
commit5074527d2c5beb9a022f58468071434fbf7fb694 (patch)
tree9dfee4e7f6c68e573b15817b3265fa9f19e70441 /src/Items/ItemDye.h
parentCMake: Fix builds in folders with spaces (diff)
downloadcuberite-5074527d2c5beb9a022f58468071434fbf7fb694.tar
cuberite-5074527d2c5beb9a022f58468071434fbf7fb694.tar.gz
cuberite-5074527d2c5beb9a022f58468071434fbf7fb694.tar.bz2
cuberite-5074527d2c5beb9a022f58468071434fbf7fb694.tar.lz
cuberite-5074527d2c5beb9a022f58468071434fbf7fb694.tar.xz
cuberite-5074527d2c5beb9a022f58468071434fbf7fb694.tar.zst
cuberite-5074527d2c5beb9a022f58468071434fbf7fb694.zip
Diffstat (limited to '')
-rw-r--r--src/Items/ItemDye.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Items/ItemDye.h b/src/Items/ItemDye.h
index 94ee9ed6f..7a119437e 100644
--- a/src/Items/ItemDye.h
+++ b/src/Items/ItemDye.h
@@ -44,6 +44,12 @@ public:
}
else if ((a_Item.m_ItemDamage == E_META_DYE_BROWN) && (a_BlockFace >= BLOCK_FACE_ZM) && (a_BlockFace <= BLOCK_FACE_XP))
{
+ // Players can't place blocks while in adventure mode.
+ if (a_Player->IsGameModeAdventure())
+ {
+ return false;
+ }
+
// Cocoa (brown dye) can be planted on jungle logs:
BLOCKTYPE BlockType;
NIBBLETYPE BlockMeta;