2014-02-02 09:59:36 -05:00
|
|
|
|
2015-04-14 04:49:01 -04:00
|
|
|
// BlockInServerPluginInterface.h
|
|
|
|
|
|
|
|
// Defines the cBlockInServerPluginInterface class that implements the cBlockPluginInterface for blocks, using the plugin manager
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-02-02 09:59:36 -05:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "Blocks/BlockPluginInterface.h"
|
|
|
|
#include "Bindings/PluginManager.h"
|
|
|
|
|
2014-10-15 13:01:55 -04:00
|
|
|
|
2017-08-07 03:08:27 -04:00
|
|
|
class cWorld;
|
2014-10-15 13:01:55 -04:00
|
|
|
|
|
|
|
|
|
|
|
class cBlockInServerPluginInterface :
|
|
|
|
public cBlockPluginInterface
|
2014-02-02 09:59:36 -05:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
cBlockInServerPluginInterface(cWorld & a_World) : m_World(a_World) {}
|
2014-10-15 13:01:55 -04:00
|
|
|
|
2015-04-14 04:49:01 -04:00
|
|
|
virtual bool CallHookBlockSpread(int a_BlockX, int a_BlockY, int a_BlockZ, eSpreadSource a_Source) override
|
2014-10-15 13:01:55 -04:00
|
|
|
{
|
|
|
|
return cPluginManager::Get()->CallHookBlockSpread(m_World, a_BlockX, a_BlockY, a_BlockZ, a_Source);
|
|
|
|
}
|
|
|
|
|
2015-04-14 04:49:01 -04:00
|
|
|
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);
|
|
|
|
}
|
|
|
|
|
2014-02-02 09:59:36 -05:00
|
|
|
private:
|
|
|
|
cWorld & m_World;
|
|
|
|
};
|
2014-10-15 13:01:55 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|