From 4ce5f215ed253c6f35462dcc7e33157078830d96 Mon Sep 17 00:00:00 2001 From: "luksor111@gmail.com" Date: Thu, 27 Dec 2012 21:08:03 +0000 Subject: Fixed OnBlockPlace hook git-svn-id: http://mc-server.googlecode.com/svn/trunk@1113 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/ClientHandle.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'source/ClientHandle.cpp') diff --git a/source/ClientHandle.cpp b/source/ClientHandle.cpp index f32b6bec7..36a84ad41 100644 --- a/source/ClientHandle.cpp +++ b/source/ClientHandle.cpp @@ -666,6 +666,16 @@ void cClientHandle::HandleBlockPlace(int a_BlockX, int a_BlockY, int a_BlockZ, c } else if (ItemHandler->IsPlaceable()) { + if (cRoot::Get()->GetPluginManager()->CallHookBlockPlace(m_Player, a_BlockX, a_BlockY, a_BlockZ, a_BlockFace, Equipped)) + { + if (a_BlockFace > -1) + { + AddDirection(a_BlockX, a_BlockY, a_BlockZ, a_BlockFace); + m_Player->GetWorld()->SendBlockTo(a_BlockX, a_BlockY, a_BlockZ, m_Player); + } + return; + } + if (a_BlockFace < 0) { // clicked in air @@ -737,16 +747,6 @@ void cClientHandle::HandleBlockPlace(int a_BlockX, int a_BlockY, int a_BlockZ, c } } } - - if (cRoot::Get()->GetPluginManager()->CallHookBlockPlace(m_Player, a_BlockX, a_BlockY, a_BlockZ, a_BlockFace, Equipped)) - { - if (a_BlockFace > -1) - { - AddDirection(a_BlockX, a_BlockY, a_BlockZ, a_BlockFace); - m_Player->GetWorld()->SendBlockTo(a_BlockX, a_BlockY, a_BlockZ, m_Player); - } - return; - } } -- cgit v1.2.3