summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2014-10-03 23:23:28 +0200
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2014-10-03 23:23:28 +0200
commitc9d6593fb0676d7b2e56528891897da3f72048be (patch)
tree74c2863fc6d25b06f913896c3f7e44fc16ffdc8d /src
parentVillagers turn to Witches on lightning (diff)
downloadcuberite-c9d6593fb0676d7b2e56528891897da3f72048be.tar
cuberite-c9d6593fb0676d7b2e56528891897da3f72048be.tar.gz
cuberite-c9d6593fb0676d7b2e56528891897da3f72048be.tar.bz2
cuberite-c9d6593fb0676d7b2e56528891897da3f72048be.tar.lz
cuberite-c9d6593fb0676d7b2e56528891897da3f72048be.tar.xz
cuberite-c9d6593fb0676d7b2e56528891897da3f72048be.tar.zst
cuberite-c9d6593fb0676d7b2e56528891897da3f72048be.zip
Diffstat (limited to 'src')
-rw-r--r--src/Items/ItemLilypad.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/Items/ItemLilypad.h b/src/Items/ItemLilypad.h
index b9d837384..9ffecd133 100644
--- a/src/Items/ItemLilypad.h
+++ b/src/Items/ItemLilypad.h
@@ -91,6 +91,14 @@ public:
if (Callbacks.m_HasHitFluid)
{
+ if (cRoot::Get()->GetPluginManager()->CallHookPlayerPlacingBlock(*a_Player, a_BlockX, a_BlockY, a_BlockZ, a_BlockFace, 0, 0, 0, E_BLOCK_LILY_PAD, 0))
+ {
+ // A plugin doesn't agree with placing the block, revert the block on the client:
+ a_World->SendBlockTo(a_BlockX, a_BlockY, a_BlockZ, a_Player);
+ a_Player->GetInventory().SendEquippedSlot();
+ return;
+ }
+
a_World->SetBlock(Callbacks.m_Pos.x, Callbacks.m_Pos.y, Callbacks.m_Pos.z, E_BLOCK_LILY_PAD, 0);
if (!a_Player->IsGameModeCreative())
{