summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/ClientHandle.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/ClientHandle.cpp b/src/ClientHandle.cpp
index b6c423652..b356a649b 100644
--- a/src/ClientHandle.cpp
+++ b/src/ClientHandle.cpp
@@ -1143,6 +1143,12 @@ void cClientHandle::HandleLeftClick(int a_BlockX, int a_BlockY, int a_BlockZ, eB
void cClientHandle::HandleBlockDigStarted(int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_BlockFace)
{
+ if (m_Player->IsGameModeAdventure())
+ {
+ // Players in adventure mode can't destroy blocks
+ return;
+ }
+
if (
m_HasStartedDigging &&
(a_BlockX == m_LastDigBlockX) &&