summaryrefslogtreecommitdiffstats
path: root/source/PluginManager.cpp
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-01-27 03:00:33 +0100
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-01-27 03:00:33 +0100
commit1a127f5510f654d47ee75b3121e52c50d3e7533b (patch)
treea968d54114b660c637bb6a9ce4102cb8257e0903 /source/PluginManager.cpp
parentRemoved cMCLogger from Lua API (diff)
downloadcuberite-1a127f5510f654d47ee75b3121e52c50d3e7533b.tar
cuberite-1a127f5510f654d47ee75b3121e52c50d3e7533b.tar.gz
cuberite-1a127f5510f654d47ee75b3121e52c50d3e7533b.tar.bz2
cuberite-1a127f5510f654d47ee75b3121e52c50d3e7533b.tar.lz
cuberite-1a127f5510f654d47ee75b3121e52c50d3e7533b.tar.xz
cuberite-1a127f5510f654d47ee75b3121e52c50d3e7533b.tar.zst
cuberite-1a127f5510f654d47ee75b3121e52c50d3e7533b.zip
Diffstat (limited to 'source/PluginManager.cpp')
-rw-r--r--source/PluginManager.cpp59
1 files changed, 6 insertions, 53 deletions
diff --git a/source/PluginManager.cpp b/source/PluginManager.cpp
index cda7a0dba..2fada4714 100644
--- a/source/PluginManager.cpp
+++ b/source/PluginManager.cpp
@@ -213,73 +213,26 @@ void cPluginManager::Tick(float a_Dt)
-/*
-bool cPluginManager::CallHookBlockToPickup(
- BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta,
- const cPlayer * a_Player, const cItem & a_EquippedItem, cItems & a_Pickups
+bool cPluginManager::CallHookBlockToPickups(
+ cWorld * a_World, cEntity * a_Digger,
+ int a_BlockX, int a_BlockY, int a_BlockZ, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta,
+ cItems & a_Pickups
)
{
- HookMap::iterator Plugins = m_Hooks.find(HOOK_POST_CRAFTING);
- if (Plugins == m_Hooks.end())
- {
- return false;
- }
- for (PluginList::iterator itr = Plugins->second.begin(); itr != Plugins->second.end(); ++itr)
- {
- if ((*itr)->OnBlockToPickup(a_BlockType, a_BlockMeta, a_Player, a_EquippedItem, a_Pickups))
- {
- return true;
- }
- }
- return false;
-}
-*/
-
-
-
-
-
-/*
-bool cPluginManager::CallHookBlockDig(cPlayer * a_Player, int a_BlockX, int a_BlockY, int a_BlockZ, char a_BlockFace, char a_Status, BLOCKTYPE a_OldBlock, NIBBLETYPE a_OldMeta)
-{
- HookMap::iterator Plugins = m_Hooks.find(HOOK_BLOCK_DIG);
- if (Plugins == m_Hooks.end())
- {
- return false;
- }
- for (PluginList::iterator itr = Plugins->second.begin(); itr != Plugins->second.end(); ++itr)
- {
- if ((*itr)->OnBlockDig(a_Player, a_BlockX, a_BlockY, a_BlockZ, a_BlockFace, a_Status, a_OldBlock, a_OldMeta))
- {
- return true;
- }
- }
- return false;
-}
-*/
-
-
-
-
-
-/*
-bool cPluginManager::CallHookBlockPlace(cPlayer * a_Player, int a_BlockX, int a_BlockY, int a_BlockZ, char a_BlockFace, const cItem & a_HeldItem)
-{
- HookMap::iterator Plugins = m_Hooks.find(HOOK_BLOCK_PLACE);
+ HookMap::iterator Plugins = m_Hooks.find(HOOK_BLOCK_TO_PICKUPS);
if (Plugins == m_Hooks.end())
{
return false;
}
for (PluginList::iterator itr = Plugins->second.begin(); itr != Plugins->second.end(); ++itr)
{
- if ((*itr)->OnBlockPlace(a_Player, a_BlockX, a_BlockY, a_BlockZ, a_BlockFace, a_HeldItem))
+ if ((*itr)->OnBlockToPickups(a_World, a_Digger, a_BlockX, a_BlockY, a_BlockZ, a_BlockType, a_BlockMeta, a_Pickups))
{
return true;
}
}
return false;
}
-*/