summaryrefslogtreecommitdiffstats
path: root/src/ClientHandle.cpp
diff options
context:
space:
mode:
authorHowaner <franzi.moos@googlemail.com>2014-10-21 21:13:35 +0200
committerHowaner <franzi.moos@googlemail.com>2014-10-21 21:13:35 +0200
commit4fe41839ccaf9d78e8288c24a20448d469770f4e (patch)
treef63eee904ea9e6f757fa5a7d81f34c0ee1bcd4e0 /src/ClientHandle.cpp
parentMoved tall grass pickups handle. (diff)
downloadcuberite-4fe41839ccaf9d78e8288c24a20448d469770f4e.tar
cuberite-4fe41839ccaf9d78e8288c24a20448d469770f4e.tar.gz
cuberite-4fe41839ccaf9d78e8288c24a20448d469770f4e.tar.bz2
cuberite-4fe41839ccaf9d78e8288c24a20448d469770f4e.tar.lz
cuberite-4fe41839ccaf9d78e8288c24a20448d469770f4e.tar.xz
cuberite-4fe41839ccaf9d78e8288c24a20448d469770f4e.tar.zst
cuberite-4fe41839ccaf9d78e8288c24a20448d469770f4e.zip
Diffstat (limited to '')
-rw-r--r--src/ClientHandle.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/ClientHandle.cpp b/src/ClientHandle.cpp
index 1daa398bd..f15d845ef 100644
--- a/src/ClientHandle.cpp
+++ b/src/ClientHandle.cpp
@@ -1118,16 +1118,16 @@ void cClientHandle::HandleBlockDigFinished(int a_BlockX, int a_BlockY, int a_Blo
cWorld * World = m_Player->GetWorld();
cItemHandler * ItemHandler = cItemHandler::GetItemHandler(m_Player->GetEquippedItem());
- if (a_OldBlock == E_BLOCK_AIR)
+ if (cRoot::Get()->GetPluginManager()->CallHookPlayerBreakingBlock(*m_Player, a_BlockX, a_BlockY, a_BlockZ, a_BlockFace, a_OldBlock, a_OldMeta))
{
- LOGD("Dug air - what the function?");
+ // A plugin doesn't agree with the breaking. Bail out. Send the block back to the client, so that it knows:
+ m_Player->GetWorld()->SendBlockTo(a_BlockX, a_BlockY, a_BlockZ, m_Player);
return;
}
- if (cRoot::Get()->GetPluginManager()->CallHookPlayerBreakingBlock(*m_Player, a_BlockX, a_BlockY, a_BlockZ, a_BlockFace, a_OldBlock, a_OldMeta))
+ if (a_OldBlock == E_BLOCK_AIR)
{
- // A plugin doesn't agree with the breaking. Bail out. Send the block back to the client, so that it knows:
- m_Player->GetWorld()->SendBlockTo(a_BlockX, a_BlockY, a_BlockZ, m_Player);
+ LOGD("Dug air - what the function?");
return;
}