Cuberite
A lightweight, fast and extensible game server for Minecraft
BlockPluginInterface.h
Go to the documentation of this file.
1 
2 // BlockPluginInterface.h
3 
4 // Declares the cBlockPluginInterface class representing an interface that the blockhandlers and itemhandlers use for calling plugins
5 
6 
7 
8 
9 
10 #pragma once
11 
12 
13 
14 
15 
16 // fwd:
17 class cPlayer;
18 
19 
20 
21 
22 
28 {
29 public:
31 
32  virtual bool CallHookBlockSpread(Vector3i a_BlockPos, eSpreadSource a_Source) = 0;
33  virtual bool CallHookPlayerBreakingBlock(cPlayer & a_Player, Vector3i a_BlockPos, eBlockFace a_BlockFace, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta) = 0;
34  virtual bool CallHookPlayerBrokenBlock(cPlayer & a_Player, Vector3i a_BlockPos, eBlockFace a_BlockFace, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta) = 0;
35 };
36 
37 
38 
39 
unsigned char NIBBLETYPE
The datatype used by nibbledata (meta, light, skylight)
Definition: ChunkDef.h:44
unsigned char BLOCKTYPE
The datatype used by blockdata.
Definition: ChunkDef.h:41
eBlockFace
Block face constants, used in PlayerDigging and PlayerBlockPlacement packets and bbox collision calc.
Definition: Defines.h:38
eSpreadSource
Definition: Defines.h:339
This interface is used to decouple block handlers from the cPluginManager dependency through cWorld.
virtual bool CallHookPlayerBreakingBlock(cPlayer &a_Player, Vector3i a_BlockPos, eBlockFace a_BlockFace, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta)=0
virtual bool CallHookPlayerBrokenBlock(cPlayer &a_Player, Vector3i a_BlockPos, eBlockFace a_BlockFace, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta)=0
virtual bool CallHookBlockSpread(Vector3i a_BlockPos, eSpreadSource a_Source)=0
Definition: Player.h:29