summaryrefslogtreecommitdiffstats
path: root/source/PluginManager.cpp
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2013-08-11 12:12:20 +0200
committermadmaxoft <github@xoft.cz>2013-08-11 12:29:05 +0200
commitdeeb3a15dc8914a3514685e8f79f543b00b2b908 (patch)
tree840a5d0a612a131318a9a40ff36b2c16f3bd28e0 /source/PluginManager.cpp
parentAttempt at fixing torch placement (diff)
downloadcuberite-deeb3a15dc8914a3514685e8f79f543b00b2b908.tar
cuberite-deeb3a15dc8914a3514685e8f79f543b00b2b908.tar.gz
cuberite-deeb3a15dc8914a3514685e8f79f543b00b2b908.tar.bz2
cuberite-deeb3a15dc8914a3514685e8f79f543b00b2b908.tar.lz
cuberite-deeb3a15dc8914a3514685e8f79f543b00b2b908.tar.xz
cuberite-deeb3a15dc8914a3514685e8f79f543b00b2b908.tar.zst
cuberite-deeb3a15dc8914a3514685e8f79f543b00b2b908.zip
Diffstat (limited to '')
-rw-r--r--source/PluginManager.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/source/PluginManager.cpp b/source/PluginManager.cpp
index 27ace86b9..523d00372 100644
--- a/source/PluginManager.cpp
+++ b/source/PluginManager.cpp
@@ -531,6 +531,27 @@ bool cPluginManager::CallHookLogin(cClientHandle * a_Client, int a_ProtocolVersi
+bool cPluginManager::CallHookPlayerAnimation(cPlayer & a_Player, int a_Animation)
+{
+ HookMap::iterator Plugins = m_Hooks.find(HOOK_PLAYER_ANIMATION);
+ if (Plugins == m_Hooks.end())
+ {
+ return false;
+ }
+ for (PluginList::iterator itr = Plugins->second.begin(); itr != Plugins->second.end(); ++itr)
+ {
+ if ((*itr)->OnPlayerAnimation(a_Player, a_Animation))
+ {
+ return true;
+ }
+ }
+ return false;
+}
+
+
+
+
+
bool cPluginManager::CallHookPlayerBreakingBlock(cPlayer & a_Player, int a_BlockX, int a_BlockY, int a_BlockZ, char a_BlockFace, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta)
{
HookMap::iterator Plugins = m_Hooks.find(HOOK_PLAYER_BREAKING_BLOCK);