summaryrefslogtreecommitdiffstats
path: root/src/ClientHandle.cpp
diff options
context:
space:
mode:
authorHownaer <franzi.moos@googlemail.com>2014-08-28 20:49:34 +0200
committerHownaer <franzi.moos@googlemail.com>2014-08-28 20:49:34 +0200
commit4470ebffd72a091cddc46022bb3f5ed378651584 (patch)
treebbc7f7b1b2acf136ca35dad8315eb6d875ee3569 /src/ClientHandle.cpp
parentMerge branch 'master' of https://github.com/mc-server/MCServer (diff)
downloadcuberite-4470ebffd72a091cddc46022bb3f5ed378651584.tar
cuberite-4470ebffd72a091cddc46022bb3f5ed378651584.tar.gz
cuberite-4470ebffd72a091cddc46022bb3f5ed378651584.tar.bz2
cuberite-4470ebffd72a091cddc46022bb3f5ed378651584.tar.lz
cuberite-4470ebffd72a091cddc46022bb3f5ed378651584.tar.xz
cuberite-4470ebffd72a091cddc46022bb3f5ed378651584.tar.zst
cuberite-4470ebffd72a091cddc46022bb3f5ed378651584.zip
Diffstat (limited to 'src/ClientHandle.cpp')
-rw-r--r--src/ClientHandle.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ClientHandle.cpp b/src/ClientHandle.cpp
index 8aa883144..f9c6a664c 100644
--- a/src/ClientHandle.cpp
+++ b/src/ClientHandle.cpp
@@ -1059,7 +1059,8 @@ void cClientHandle::HandleBlockDigStarted(int a_BlockX, int a_BlockY, int a_Bloc
if (
m_Player->IsGameModeCreative() &&
- ItemCategory::IsSword(m_Player->GetInventory().GetEquippedItem().m_ItemType)
+ ItemCategory::IsSword(m_Player->GetInventory().GetEquippedItem().m_ItemType) &&
+ (m_Player->GetWorld()->GetBlock(a_BlockX, a_BlockY, a_BlockZ) != E_BLOCK_FIRE)
)
{
// Players can't destroy blocks with a Sword in the hand.