diff options
author | Ethan Jones <ethan@yasfu.net> | 2021-09-15 19:33:45 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-15 19:33:45 +0200 |
commit | 9712c5507c3a063313c69ffcb4579fb93f045a31 (patch) | |
tree | bd9c33ce9050244bd823817df4e46040f8ffb3c3 /src | |
parent | Ignore dead entities and spectator players on pressure plates (#5294) (diff) | |
download | cuberite-9712c5507c3a063313c69ffcb4579fb93f045a31.tar cuberite-9712c5507c3a063313c69ffcb4579fb93f045a31.tar.gz cuberite-9712c5507c3a063313c69ffcb4579fb93f045a31.tar.bz2 cuberite-9712c5507c3a063313c69ffcb4579fb93f045a31.tar.lz cuberite-9712c5507c3a063313c69ffcb4579fb93f045a31.tar.xz cuberite-9712c5507c3a063313c69ffcb4579fb93f045a31.tar.zst cuberite-9712c5507c3a063313c69ffcb4579fb93f045a31.zip |
Diffstat (limited to 'src')
-rw-r--r-- | src/ClientHandle.cpp | 6 |
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) && |