summaryrefslogtreecommitdiffstats
path: root/source/PluginManager.cpp
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2013-08-11 14:57:07 +0200
committermadmaxoft <github@xoft.cz>2013-08-11 14:57:07 +0200
commitdd60f55bccd603650906d5025f689a82d00b3718 (patch)
tree773db077844972b21488c448f88572ca691baa51 /source/PluginManager.cpp
parentAdded an AllowEmptyStacks param to cItemGrid::HowManyCanFit(). (diff)
downloadcuberite-dd60f55bccd603650906d5025f689a82d00b3718.tar
cuberite-dd60f55bccd603650906d5025f689a82d00b3718.tar.gz
cuberite-dd60f55bccd603650906d5025f689a82d00b3718.tar.bz2
cuberite-dd60f55bccd603650906d5025f689a82d00b3718.tar.lz
cuberite-dd60f55bccd603650906d5025f689a82d00b3718.tar.xz
cuberite-dd60f55bccd603650906d5025f689a82d00b3718.tar.zst
cuberite-dd60f55bccd603650906d5025f689a82d00b3718.zip
Diffstat (limited to '')
-rw-r--r--source/PluginManager.cpp42
1 files changed, 42 insertions, 0 deletions
diff --git a/source/PluginManager.cpp b/source/PluginManager.cpp
index 523d00372..de1963f91 100644
--- a/source/PluginManager.cpp
+++ b/source/PluginManager.cpp
@@ -489,6 +489,48 @@ bool cPluginManager::CallHookHandshake(cClientHandle * a_ClientHandle, const ASt
+bool cPluginManager::CallHookHopperPullingItem(cWorld & a_World, cHopperEntity & a_Hopper, int a_DstSlotNum, cBlockEntityWithItems & a_SrcEntity, int a_SrcSlotNum)
+{
+ HookMap::iterator Plugins = m_Hooks.find(HOOK_HOPPER_PULLING_ITEM);
+ if (Plugins == m_Hooks.end())
+ {
+ return false;
+ }
+ for (PluginList::iterator itr = Plugins->second.begin(); itr != Plugins->second.end(); ++itr)
+ {
+ if ((*itr)->OnHopperPullingItem(a_World, a_Hopper, a_DstSlotNum, a_SrcEntity, a_SrcSlotNum))
+ {
+ return true;
+ }
+ }
+ return false;
+}
+
+
+
+
+
+bool cPluginManager::CallHookHopperPushingItem(cWorld & a_World, cHopperEntity & a_Hopper, int a_SrcSlotNum, cBlockEntityWithItems & a_DstEntity, int a_DstSlotNum)
+{
+ HookMap::iterator Plugins = m_Hooks.find(HOOK_HOPPER_PUSHING_ITEM);
+ if (Plugins == m_Hooks.end())
+ {
+ return false;
+ }
+ for (PluginList::iterator itr = Plugins->second.begin(); itr != Plugins->second.end(); ++itr)
+ {
+ if ((*itr)->OnHopperPushingItem(a_World, a_Hopper, a_SrcSlotNum, a_DstEntity, a_DstSlotNum))
+ {
+ return true;
+ }
+ }
+ return false;
+}
+
+
+
+
+
bool cPluginManager::CallHookKilling(cEntity & a_Victim, cEntity * a_Killer)
{
HookMap::iterator Plugins = m_Hooks.find(HOOK_KILLING);