summaryrefslogtreecommitdiffstats
path: root/src/BlockInServerPluginInterface.h
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2015-04-15 11:07:03 +0200
committerMattes D <github@xoft.cz>2015-04-15 11:07:03 +0200
commit1d8a22cb7b867b3378b355e52ae56e2433fa7cb3 (patch)
treed5ab0c710fc93acdc2b8a2041d40c6d918fbbf33 /src/BlockInServerPluginInterface.h
parentMerge pull request #1844 from DevToaster/master (diff)
parentScooping up fluid calls the player placement hooks. (diff)
downloadcuberite-1d8a22cb7b867b3378b355e52ae56e2433fa7cb3.tar
cuberite-1d8a22cb7b867b3378b355e52ae56e2433fa7cb3.tar.gz
cuberite-1d8a22cb7b867b3378b355e52ae56e2433fa7cb3.tar.bz2
cuberite-1d8a22cb7b867b3378b355e52ae56e2433fa7cb3.tar.lz
cuberite-1d8a22cb7b867b3378b355e52ae56e2433fa7cb3.tar.xz
cuberite-1d8a22cb7b867b3378b355e52ae56e2433fa7cb3.tar.zst
cuberite-1d8a22cb7b867b3378b355e52ae56e2433fa7cb3.zip
Diffstat (limited to 'src/BlockInServerPluginInterface.h')
-rw-r--r--src/BlockInServerPluginInterface.h20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/BlockInServerPluginInterface.h b/src/BlockInServerPluginInterface.h
index 70c9944a8..d4759ce83 100644
--- a/src/BlockInServerPluginInterface.h
+++ b/src/BlockInServerPluginInterface.h
@@ -1,4 +1,12 @@
+// BlockInServerPluginInterface.h
+
+// Defines the cBlockInServerPluginInterface class that implements the cBlockPluginInterface for blocks, using the plugin manager
+
+
+
+
+
#pragma once
#include "Blocks/BlockPluginInterface.h"
@@ -16,7 +24,7 @@ class cBlockInServerPluginInterface :
public:
cBlockInServerPluginInterface(cWorld & a_World) : m_World(a_World) {}
- virtual bool CallHookBlockSpread(int a_BlockX, int a_BlockY, int a_BlockZ, eSpreadSource a_Source)
+ virtual bool CallHookBlockSpread(int a_BlockX, int a_BlockY, int a_BlockZ, eSpreadSource a_Source) override
{
return cPluginManager::Get()->CallHookBlockSpread(m_World, a_BlockX, a_BlockY, a_BlockZ, a_Source);
}
@@ -26,6 +34,16 @@ public:
return cPluginManager::Get()->CallHookBlockToPickups(m_World, a_Digger, a_BlockX, a_BlockY, a_BlockZ, a_BlockType, a_BlockMeta, a_Pickups);
}
+ virtual bool CallHookPlayerBreakingBlock(cPlayer & a_Player, int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_BlockFace, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta) override
+ {
+ return cPluginManager::Get()->CallHookPlayerBreakingBlock(a_Player, a_BlockX, a_BlockY, a_BlockZ, a_BlockFace, a_BlockType, a_BlockMeta);
+ }
+
+ virtual bool CallHookPlayerBrokenBlock(cPlayer & a_Player, int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_BlockFace, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta) override
+ {
+ return cPluginManager::Get()->CallHookPlayerBrokenBlock(a_Player, a_BlockX, a_BlockY, a_BlockZ, a_BlockFace, a_BlockType, a_BlockMeta);
+ }
+
private:
cWorld & m_World;
};